diff options
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r-- | Lib/test/pickletester.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 50e9aa4..3d65383 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -293,6 +293,13 @@ class AbstractPickleTests(unittest.TestCase): y = self.loads(s) self.assertEqual(x, y, (proto, x, s, y)) + def test_singletons(self): + for proto in 0, 1, 2: + for x in None, False, True: + s = self.dumps(x, proto) + y = self.loads(s) + self.assert_(x is y, (proto, x, s, y)) + class AbstractPickleModuleTests(unittest.TestCase): def test_dump_closed_file(self): |