diff options
Diffstat (limited to 'Lib/test/test_dictviews.py')
-rw-r--r-- | Lib/test/test_dictviews.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Lib/test/test_dictviews.py b/Lib/test/test_dictviews.py index 4fee755..4d12647 100644 --- a/Lib/test/test_dictviews.py +++ b/Lib/test/test_dictviews.py @@ -24,10 +24,10 @@ class DictSetTest(unittest.TestCase): self.assertNotEqual(keys, {1, "b"}) self.assertNotEqual(keys, {1}) self.assertNotEqual(keys, 42) - self.assertTrue(1 in keys) - self.assertTrue("a" in keys) - self.assertTrue(10 not in keys) - self.assertTrue("Z" not in keys) + self.assertIn(1, keys) + self.assertIn("a", keys) + self.assertNotIn(10, keys) + self.assertNotIn("Z", keys) self.assertEqual(d.keys(), d.keys()) e = {1: 11, "a": "def"} self.assertEqual(d.keys(), e.keys()) @@ -44,13 +44,13 @@ class DictSetTest(unittest.TestCase): self.assertNotEqual(items, {(1, 10), ("a", "def")}) self.assertNotEqual(items, {(1, 10)}) self.assertNotEqual(items, 42) - self.assertTrue((1, 10) in items) - self.assertTrue(("a", "ABC") in items) - self.assertTrue((1, 11) not in items) - self.assertTrue(1 not in items) - self.assertTrue(() not in items) - self.assertTrue((1,) not in items) - self.assertTrue((1, 2, 3) not in items) + self.assertIn((1, 10), items) + self.assertIn(("a", "ABC"), items) + self.assertNotIn((1, 11), items) + self.assertNotIn(1, items) + self.assertNotIn((), items) + self.assertNotIn((1,), items) + self.assertNotIn((1, 2, 3), items) self.assertEqual(d.items(), d.items()) e = d.copy() self.assertEqual(d.items(), e.items()) |