diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-23 23:04:36 +0000 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-23 23:04:36 +0000 |
commit | aa98058cc44ba20f35c106d20918c6196b737561 (patch) | |
tree | 317b6f7bf17df98e284d0902ae10a64faf4ccd91 /Lib/test/pickletester.py | |
parent | 8cd0a66a0fd7bb7d69153906942930c2e8c3dd17 (diff) | |
download | cpython-git-aa98058cc44ba20f35c106d20918c6196b737561.tar.gz |
use assert[Not]In where appropriate
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r-- | Lib/test/pickletester.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 0bdcc1079f..c9e74b857f 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -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) |