summaryrefslogtreecommitdiffstats
path: root/Lib/test/pickletester.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-01-23 15:40:09 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-01-23 15:40:09 (GMT)
commitb58e0bd8bb7592dd48b30af546fc20f52ac625bd (patch)
tree2af0b7f4177890e1781f8d38aed8ebdc44c71f39 /Lib/test/pickletester.py
parent0f77f465ff7f5e39bbf701b575aebf75dd8d800d (diff)
downloadcpython-b58e0bd8bb7592dd48b30af546fc20f52ac625bd.zip
cpython-b58e0bd8bb7592dd48b30af546fc20f52ac625bd.tar.gz
cpython-b58e0bd8bb7592dd48b30af546fc20f52ac625bd.tar.bz2
use assert[Not]In where appropriate
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r--Lib/test/pickletester.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index 7ded8b6..dc1d156 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -770,8 +770,8 @@ class AbstractPickleTests(unittest.TestCase):
# Dump using protocol 1 for comparison.
s1 = self.dumps(x, 1)
- self.assertTrue(__name__.encode("utf-8") in s1)
- self.assertTrue(b"MyList" in s1)
+ self.assertIn(__name__.encode("utf-8"), s1)
+ self.assertIn(b"MyList", s1)
self.assertEqual(opcode_in_pickle(opcode, s1), False)
y = self.loads(s1)
@@ -780,8 +780,8 @@ class AbstractPickleTests(unittest.TestCase):
# Dump using protocol 2 for test.
s2 = self.dumps(x, 2)
- self.assertTrue(__name__.encode("utf-8") not in s2)
- self.assertTrue(b"MyList" not in s2)
+ self.assertNotIn(__name__.encode("utf-8"), s2)
+ self.assertNotIn(b"MyList", s2)
self.assertEqual(opcode_in_pickle(opcode, s2), True, repr(s2))
y = self.loads(s2)