diff options
Diffstat (limited to 'Lib/test/test_multiprocessing.py')
-rw-r--r-- | Lib/test/test_multiprocessing.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index 66b2a2f..5b5119b 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -163,7 +163,7 @@ class _TestProcess(BaseTestCase): self.assertEquals(p.authkey, current.authkey) self.assertEquals(p.is_alive(), False) self.assertEquals(p.daemon, True) - self.assertTrue(p not in self.active_children()) + self.assertNotIn(p, self.active_children()) self.assertTrue(type(self.active_children()) is list) self.assertEqual(p.exitcode, None) @@ -171,7 +171,7 @@ class _TestProcess(BaseTestCase): self.assertEquals(p.exitcode, None) self.assertEquals(p.is_alive(), True) - self.assertTrue(p in self.active_children()) + self.assertIn(p, self.active_children()) self.assertEquals(q.get(), args[1:]) self.assertEquals(q.get(), kwargs) @@ -184,7 +184,7 @@ class _TestProcess(BaseTestCase): self.assertEquals(p.exitcode, 0) self.assertEquals(p.is_alive(), False) - self.assertTrue(p not in self.active_children()) + self.assertNotIn(p, self.active_children()) def _test_terminate(self): time.sleep(1000) @@ -198,7 +198,7 @@ class _TestProcess(BaseTestCase): p.start() self.assertEqual(p.is_alive(), True) - self.assertTrue(p in self.active_children()) + self.assertIn(p, self.active_children()) self.assertEqual(p.exitcode, None) p.terminate() @@ -208,7 +208,7 @@ class _TestProcess(BaseTestCase): self.assertTimingAlmostEqual(join.elapsed, 0.0) self.assertEqual(p.is_alive(), False) - self.assertTrue(p not in self.active_children()) + self.assertNotIn(p, self.active_children()) p.join() @@ -227,13 +227,13 @@ class _TestProcess(BaseTestCase): self.assertEqual(type(self.active_children()), list) p = self.Process(target=time.sleep, args=(DELTA,)) - self.assertTrue(p not in self.active_children()) + self.assertNotIn(p, self.active_children()) p.start() - self.assertTrue(p in self.active_children()) + self.assertIn(p, self.active_children()) p.join() - self.assertTrue(p not in self.active_children()) + self.assertNotIn(p, self.active_children()) def _test_recursion(self, wconn, id): from multiprocessing import forking |