diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-23 15:40:09 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-23 15:40:09 (GMT) |
commit | b58e0bd8bb7592dd48b30af546fc20f52ac625bd (patch) | |
tree | 2af0b7f4177890e1781f8d38aed8ebdc44c71f39 /Lib/test/test_weakset.py | |
parent | 0f77f465ff7f5e39bbf701b575aebf75dd8d800d (diff) | |
download | cpython-b58e0bd8bb7592dd48b30af546fc20f52ac625bd.zip cpython-b58e0bd8bb7592dd48b30af546fc20f52ac625bd.tar.gz cpython-b58e0bd8bb7592dd48b30af546fc20f52ac625bd.tar.bz2 |
use assert[Not]In where appropriate
Diffstat (limited to 'Lib/test/test_weakset.py')
-rw-r--r-- | Lib/test/test_weakset.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_weakset.py b/Lib/test/test_weakset.py index 0136d75..fe68b66 100644 --- a/Lib/test/test_weakset.py +++ b/Lib/test/test_weakset.py @@ -35,7 +35,7 @@ class TestWeakSet(unittest.TestCase): for method in dir(set): if method == 'test_c_api' or method.startswith('_'): continue - self.assertTrue(method in weaksetmethods, + self.assertIn(method, weaksetmethods, "WeakSet missing method " + method) def test_new_or_init(self): @@ -342,10 +342,10 @@ class TestWeakSet(unittest.TestCase): it = None # should commit all removals with testcontext() as u: - self.assertFalse(u in s) + self.assertNotIn(u, s) with testcontext() as u: self.assertRaises(KeyError, s.remove, u) - self.assertFalse(u in s) + self.assertNotIn(u, s) with testcontext() as u: s.add(u) self.assertIn(u, s) |