summaryrefslogtreecommitdiff
path: root/Lib/test/test_multiprocessing.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-01-23 23:04:36 +0000
committerEzio Melotti <ezio.melotti@gmail.com>2010-01-23 23:04:36 +0000
commitaa98058cc44ba20f35c106d20918c6196b737561 (patch)
tree317b6f7bf17df98e284d0902ae10a64faf4ccd91 /Lib/test/test_multiprocessing.py
parent8cd0a66a0fd7bb7d69153906942930c2e8c3dd17 (diff)
downloadcpython-git-aa98058cc44ba20f35c106d20918c6196b737561.tar.gz
use assert[Not]In where appropriate
Diffstat (limited to 'Lib/test/test_multiprocessing.py')
-rw-r--r--Lib/test/test_multiprocessing.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
index b6c6a844b0..fa16536a55 100644
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -162,7 +162,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)
@@ -170,7 +170,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)
@@ -183,7 +183,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)
@@ -197,7 +197,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()
@@ -207,7 +207,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()
@@ -226,13 +226,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