mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +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
|
|
@ -767,8 +767,8 @@ class AbstractPickleTests(unittest.TestCase):
|
|||
|
||||
# Dump using protocol 1 for comparison.
|
||||
s1 = self.dumps(x, 1)
|
||||
self.assertTrue(__name__ in s1)
|
||||
self.assertTrue("MyList" in s1)
|
||||
self.assertIn(__name__, s1)
|
||||
self.assertIn("MyList", s1)
|
||||
self.assertEqual(opcode_in_pickle(opcode, s1), False)
|
||||
|
||||
y = self.loads(s1)
|
||||
|
|
@ -777,8 +777,8 @@ class AbstractPickleTests(unittest.TestCase):
|
|||
|
||||
# Dump using protocol 2 for test.
|
||||
s2 = self.dumps(x, 2)
|
||||
self.assertTrue(__name__ not in s2)
|
||||
self.assertTrue("MyList" not in s2)
|
||||
self.assertNotIn(__name__, s2)
|
||||
self.assertNotIn("MyList", s2)
|
||||
self.assertEqual(opcode_in_pickle(opcode, s2), True)
|
||||
|
||||
y = self.loads(s2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue