Show More
@@ -318,9 +318,9 b' class TestView(ClusterTestCase):' | |||
|
318 | 318 | sys.stdout = sio |
|
319 | 319 | ip.magic_px('print a') |
|
320 | 320 | sys.stdout = savestdout |
|
321 |
sio. |
|
|
322 |
self.assertTrue('[stdout:%i]'%v.targets in |
|
|
323 |
self.assertTrue( |
|
|
321 | buf = sio.getvalue() | |
|
322 | self.assertTrue('[stdout:%i]'%v.targets in buf) | |
|
323 | self.assertTrue(buf.rstrip().endswith('10')) | |
|
324 | 324 | self.assertRaisesRemote(ZeroDivisionError, ip.magic_px, '1/0') |
|
325 | 325 | |
|
326 | 326 | def test_magic_px_nonblocking(self): |
@@ -338,8 +338,8 b' class TestView(ClusterTestCase):' | |||
|
338 | 338 | sys.stdout = sio |
|
339 | 339 | ip.magic_px('print a') |
|
340 | 340 | sys.stdout = savestdout |
|
341 |
sio. |
|
|
342 |
self.assertFalse('[stdout:%i]'%v.targets in |
|
|
341 | buf = sio.getvalue() | |
|
342 | self.assertFalse('[stdout:%i]'%v.targets in buf) | |
|
343 | 343 | ip.magic_px('1/0') |
|
344 | 344 | ar = v.get_result(-1) |
|
345 | 345 | self.assertRaisesRemote(ZeroDivisionError, ar.get) |
@@ -360,8 +360,7 b' class TestView(ClusterTestCase):' | |||
|
360 | 360 | ip.run_code(compile('b*=2', '', 'single')) |
|
361 | 361 | ip.magic_autopx() |
|
362 | 362 | sys.stdout = savestdout |
|
363 | sio.read() | |
|
364 | output = sio.buf.strip() | |
|
363 | output = sio.getvalue().strip() | |
|
365 | 364 | self.assertTrue(output.startswith('%autopx enabled')) |
|
366 | 365 | self.assertTrue(output.endswith('%autopx disabled')) |
|
367 | 366 | self.assertTrue('RemoteError: ZeroDivisionError' in output) |
@@ -386,8 +385,7 b' class TestView(ClusterTestCase):' | |||
|
386 | 385 | ip.run_code(compile('b*=2', '', 'single')) |
|
387 | 386 | ip.magic_autopx() |
|
388 | 387 | sys.stdout = savestdout |
|
389 | sio.read() | |
|
390 | output = sio.buf.strip() | |
|
388 | output = sio.getvalue().strip() | |
|
391 | 389 | self.assertTrue(output.startswith('%autopx enabled')) |
|
392 | 390 | self.assertTrue(output.endswith('%autopx disabled')) |
|
393 | 391 | self.assertFalse('ZeroDivisionError' in output) |
General Comments 0
You need to be logged in to leave comments.
Login now