diff options
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r-- | Lib/test/pickletester.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 721429816f..f1a138488c 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -502,6 +502,12 @@ class AbstractPickleTests(unittest.TestCase): y = self.loads(s) self.assert_(x is y, (proto, x, s, y)) + # Test that proto >= 2 really uses the bool opcodes. + if proto >= 2 and x in (False, True): + expected = x and pickle.NEWTRUE or pickle.NEWFALSE + # Skip the PROTO opcode at the start. + self.assertEqual(s[2], expected) + def test_newobj_tuple(self): x = MyTuple([1, 2, 3]) x.foo = 42 |