@@ -206,14 +206,14 @@ def test_runforever_eager_error_on_request_some(self):
206206 prog .stdin .seek (0 )
207207 prog .runforever (test = True )
208208 lines = prog .stderr .getvalue ().split ('\n ' )
209- self .assertIn ("Restarting selected processes ['foo', 'bar', "
210- "'baz_01', 'notexisting']" , lines [0 ])
211- self .assertIn ('foo is in RUNNING state, restarting' , lines [1 ])
212- self .assertIn ('foo restarted' , lines [2 ])
213- self .assertIn ('bar not in RUNNING state, NOT restarting' , lines [3 ])
214- self .assertIn ('baz:baz_01 not in RUNNING state, NOT restarting' ,
209+ self .assertTrue ("Restarting selected processes ['foo', 'bar', "
210+ "'baz_01', 'notexisting']" in lines [0 ])
211+ self .assertTrue ('foo is in RUNNING state, restarting' in lines [1 ])
212+ self .assertTrue ('foo restarted' in lines [2 ])
213+ self .assertTrue ('bar not in RUNNING state, NOT restarting' in lines [3 ])
214+ self .assertTrue ('baz:baz_01 not in RUNNING state, NOT restarting' in
215215 lines [4 ])
216- self .assertIn ("Programs not restarted because "
216+ self .assertTrue ("Programs not restarted because "
217217 "they did not exist: ['notexisting']" , lines [5 ])
218218 mailed = prog .mailed .split ('\n ' )
219219 self .assertEqual (len (mailed ), 12 )
@@ -229,11 +229,11 @@ def test_runforever_eager_error_on_request_any(self):
229229 prog .stdin .seek (0 )
230230 prog .runforever (test = True )
231231 lines = prog .stderr .getvalue ().split ('\n ' )
232- self .assertIn ('Restarting all running processes' , lines [0 ])
233- self .assertIn ('foo is in RUNNING state, restarting' , lines [1 ])
234- self .assertIn ('foo restarted' , lines [2 ])
235- self .assertIn ('bar not in RUNNING state, NOT restarting' , lines [3 ])
236- self .assertIn ('baz:baz_01 not in RUNNING state, NOT restarting' ,
232+ self .assertTrue ('Restarting all running processes' in lines [0 ])
233+ self .assertTrue ('foo is in RUNNING state, restarting' in lines [1 ])
234+ self .assertTrue ('foo restarted' in lines [2 ])
235+ self .assertTrue ('bar not in RUNNING state, NOT restarting' in lines [3 ])
236+ self .assertTrue ('baz:baz_01 not in RUNNING state, NOT restarting' in
237237 lines [4 ])
238238 mailed = prog .mailed .split ('\n ' )
239239 self .assertEqual (len (mailed ), 11 )
@@ -250,11 +250,11 @@ def test_runforever_eager_error_on_process_stop(self):
250250 prog .stdin .seek (0 )
251251 prog .runforever (test = True )
252252 lines = prog .stderr .getvalue ().split ('\n ' )
253- self .assertIn ("Restarting selected processes ['FAILED']" , lines [0 ])
254- self .assertIn ('foo:FAILED is in RUNNING state, restarting' , lines [1 ])
255- self .assertIn ("Failed to stop process foo:FAILED: "
256- "<Fault 30: 'FAILED'>" , lines [2 ])
257- self .assertIn ('foo:FAILED restarted' , lines [3 ])
253+ self .assertTrue ("Restarting selected processes ['FAILED']" in lines [0 ])
254+ self .assertTrue ('foo:FAILED is in RUNNING state, restarting' in lines [1 ])
255+ self .assertTrue ("Failed to stop process foo:FAILED: "
256+ "<Fault 30: 'FAILED'>" in lines [2 ])
257+ self .assertTrue ('foo:FAILED restarted' in lines [3 ])
258258 mailed = prog .mailed .split ('\n ' )
259259 self .assertEqual (len (mailed ), 10 )
260260 self .
assertEqual (
mailed [
0 ],
'To: [email protected] ' )
@@ -270,11 +270,11 @@ def test_runforever_eager_error_on_process_start(self):
270270 prog .stdin .seek (0 )
271271 prog .runforever (test = True )
272272 lines = prog .stderr .getvalue ().split ('\n ' )
273- self .assertIn ("Restarting selected processes ['SPAWN_ERROR']" , lines [0 ])
274- self .assertIn ('foo:SPAWN_ERROR is in RUNNING state, restarting' ,
273+ self .assertTrue ("Restarting selected processes ['SPAWN_ERROR']" in lines [0 ])
274+ self .assertTrue ('foo:SPAWN_ERROR is in RUNNING state, restarting' in
275275 lines [1 ])
276- self .assertIn ("Failed to start process foo:SPAWN_ERROR: "
277- "<Fault 50: 'SPAWN_ERROR'>" , lines [2 ])
276+ self .assertTrue ("Failed to start process foo:SPAWN_ERROR: "
277+ "<Fault 50: 'SPAWN_ERROR'>" in lines [2 ])
278278 mailed = prog .mailed .split ('\n ' )
279279 self .assertEqual (len (mailed ), 9 )
280280 self .
assertEqual (
mailed [
0 ],
'To: [email protected] ' )
@@ -290,18 +290,18 @@ def test_runforever_eager_gcore(self):
290290 prog .stdin .seek (0 )
291291 prog .runforever (test = True )
292292 lines = prog .stderr .getvalue ().split ('\n ' )
293- self .assertIn ("Restarting selected processes ['foo', 'bar', "
294- "'baz_01', 'notexisting']" , lines [0 ])
295- self .assertIn ('gcore output for foo:' , lines [1 ])
293+ self .assertTrue ("Restarting selected processes ['foo', 'bar', "
294+ "'baz_01', 'notexisting']" in lines [0 ])
295+ self .assertTrue ('gcore output for foo:' in lines [1 ])
296296 self .assertEqual (lines [2 ], '' )
297297 self .assertEqual (lines [3 ], ' ' )
298- self .assertIn ('foo is in RUNNING state, restarting' , lines [4 ])
299- self .assertIn ('foo restarted' , lines [5 ])
300- self .assertIn ('bar not in RUNNING state, NOT restarting' , lines [6 ])
301- self .assertIn ('baz:baz_01 not in RUNNING state, NOT restarting' ,
298+ self .assertTrue ('foo is in RUNNING state, restarting' in lines [4 ])
299+ self .assertTrue ('foo restarted' in lines [5 ])
300+ self .assertTrue ('bar not in RUNNING state, NOT restarting' in lines [6 ])
301+ self .assertTrue ('baz:baz_01 not in RUNNING state, NOT restarting' in
302302 lines [7 ])
303- self .assertIn ("Programs not restarted because they did not exist: "
304- "['notexisting']" , lines [8 ])
303+ self .assertTrue ("Programs not restarted because they did not exist: "
304+ "['notexisting']" in lines [8 ])
305305 mailed = prog .mailed .split ('\n ' )
306306 self .assertEqual (len (mailed ), 15 )
307307 self .
assertEqual (
mailed [
0 ],
'To: [email protected] ' )
@@ -328,10 +328,10 @@ def test_runforever_not_eager_running(self):
328328 prog .stdin .seek (0 )
329329 prog .runforever (test = True )
330330 lines = [x for x in prog .stderr .getvalue ().split ('\n ' ) if x ]
331- self .assertIn ("Restarting selected processes ['foo', 'bar']" , lines [0 ])
332- self .assertIn ('foo is in RUNNING state, restarting' , lines [1 ])
333- self .assertIn ('foo restarted' , lines [2 ])
334- self .assertIn ('bar not in RUNNING state, NOT restarting' , lines [3 ])
331+ self .assertTrue ("Restarting selected processes ['foo', 'bar']" in lines [0 ])
332+ self .assertTrue ('foo is in RUNNING state, restarting' in lines [1 ])
333+ self .assertTrue ('foo restarted' in lines [2 ])
334+ self .assertTrue ('bar not in RUNNING state, NOT restarting' in lines [3 ])
335335 mailed = prog .mailed .split ('\n ' )
336336 self .assertEqual (len (mailed ), 10 )
337337 self .
assertEqual (
mailed [
0 ],
'To: [email protected] ' )
@@ -361,10 +361,11 @@ def test_runforever_connrefused_error(self):
361361 prog .stdin .seek (0 )
362362 prog .runforever (test = True )
363363 lines = [x for x in prog .stderr .getvalue ().split ('\n ' ) if x ]
364- self .assertIn ("Restarting selected processes ['foo', 'bar']" , lines [0 ])
365- self .assertIn ('foo is in RUNNING state, restarting' , lines [1 ])
366- self .assertIn ('foo restarted' , lines [2 ])
367- self .assertIn ('bar not in RUNNING state, NOT restarting' , lines [3 ])
364+ self .assertTrue ("Restarting selected processes ['foo', 'bar']"
365+ in lines [0 ])
366+ self .assertTrue ('foo is in RUNNING state, restarting' in lines [1 ])
367+ self .assertTrue ('foo restarted' in lines [2 ])
368+ self .assertTrue ('bar not in RUNNING state, NOT restarting' in lines [3 ])
368369 mailed = prog .mailed .split ('\n ' )
369370 self .assertEqual (len (mailed ), 10 )
370371 self .
assertEqual (
mailed [
0 ],
'To: [email protected] ' )
0 commit comments