summaryrefslogtreecommitdiffstats
path: root/Lib/test/pickletester.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-01-28 04:25:27 (GMT)
committerGuido van Rossum <guido@python.org>2003-01-28 04:25:27 (GMT)
commit7d97d31a1b254104037c3653fa2229cb273fa713 (patch)
tree6351bae93fc3163346be99c6f2356b27ea7cd0a7 /Lib/test/pickletester.py
parent025bc2fe6c1d71505b95b6351795cba7724fd45f (diff)
downloadcpython-7d97d31a1b254104037c3653fa2229cb273fa713.zip
cpython-7d97d31a1b254104037c3653fa2229cb273fa713.tar.gz
cpython-7d97d31a1b254104037c3653fa2229cb273fa713.tar.bz2
OK, this is really the last one tonight!
NEWFALSE and NEWTRUE.
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r--Lib/test/pickletester.py7
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):