mirror of
https://github.com/python/cpython.git
synced 2025-12-10 11:00:14 +00:00
use assert[Not]In where appropriate
This commit is contained in:
parent
8cd0a66a0f
commit
aa98058cc4
86 changed files with 622 additions and 599 deletions
|
|
@ -76,7 +76,7 @@ class TestBasicOps(unittest.TestCase):
|
|||
|
||||
def test_iteration(self):
|
||||
for v in self.set:
|
||||
self.assertTrue(v in self.values)
|
||||
self.assertIn(v, self.values)
|
||||
|
||||
def test_pickling(self):
|
||||
p = pickle.dumps(self.set)
|
||||
|
|
@ -406,7 +406,7 @@ class TestMutate(unittest.TestCase):
|
|||
popped[self.set.pop()] = None
|
||||
self.assertEqual(len(popped), len(self.values))
|
||||
for v in self.values:
|
||||
self.assertTrue(v in popped)
|
||||
self.assertIn(v, popped)
|
||||
|
||||
def test_update_empty_tuple(self):
|
||||
self.set.union_update(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue