diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-23 15:40:09 +0000 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-23 15:40:09 +0000 |
commit | 7f2a5fb7d00e7ff1cfe23217051728c79381bb3d (patch) | |
tree | 88c64d51ed4199316dcda5c3644b3ea1c80598db /Lib/test/test_weakset.py | |
parent | f2b27c8f710f2f552108eda4758787d0a050cd78 (diff) | |
download | cpython-7f2a5fb7d00e7ff1cfe23217051728c79381bb3d.tar.gz |
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 0136d75dc3..fe68b665c8 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) |