OK, this is really the last one tonight!

NEWFALSE and NEWTRUE.
This commit is contained in:
Guido van Rossum 2003-01-28 04:25:27 +00:00
parent 025bc2fe6c
commit 7d97d31a1b
2 changed files with 19 additions and 1 deletions

View file

@ -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):