diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-01-19 00:09:57 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-01-19 00:09:57 (GMT) |
commit | 577473fe687b38c8f01b0c372d6d2563680045b3 (patch) | |
tree | ee7dc210c7c5281cf07add09a9cb451758e91716 /Lib/test/test_dbm.py | |
parent | a69ba65fdce3be6f55634b47cc56cf1f962f6cbc (diff) | |
download | cpython-577473fe687b38c8f01b0c372d6d2563680045b3.zip cpython-577473fe687b38c8f01b0c372d6d2563680045b3.tar.gz cpython-577473fe687b38c8f01b0c372d6d2563680045b3.tar.bz2 |
use assert[Not]In where appropriate
A patch from Dave Malcolm.
Diffstat (limited to 'Lib/test/test_dbm.py')
-rw-r--r-- | Lib/test/test_dbm.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_dbm.py b/Lib/test/test_dbm.py index 818be45..2008776 100644 --- a/Lib/test/test_dbm.py +++ b/Lib/test/test_dbm.py @@ -131,7 +131,7 @@ class WhichDBTestCase(unittest.TestCase): f = module.open(_fname, 'w') f[b"1"] = b"1" # and test that we can find it - self.assertTrue(b"1" in f) + self.assertIn(b"1", f) # and read it self.assertTrue(f[b"1"] == b"1") f.close() @@ -154,9 +154,9 @@ class WhichDBTestCase(unittest.TestCase): self.d[k] = v self.assertEqual(sorted(self.d.keys()), sorted(k for (k, v) in a)) for k, v in a: - self.assertTrue(k in self.d) + self.assertIn(k, self.d) self.assertEqual(self.d[k], v) - self.assertTrue(b'xxx' not in self.d) + self.assertNotIn(b'xxx', self.d) self.assertRaises(KeyError, lambda: self.d[b'xxx']) self.d.close() |