summaryrefslogtreecommitdiffstats
path: root/Lib/test/pickletester.py
diff options
context:
space:
mode:
authorŁukasz Langa <lukasz@langa.pl>2012-03-12 18:46:12 (GMT)
committerŁukasz Langa <lukasz@langa.pl>2012-03-12 18:46:12 (GMT)
commitf3078fbee2b6555f0f5b1819a231f4b7d8bdf6b5 (patch)
treee1948498519d1e9e3d5cb91493ec9d6928268425 /Lib/test/pickletester.py
parente976fc74647f679519edde2a1e0b73ff711e079b (diff)
downloadcpython-f3078fbee2b6555f0f5b1819a231f4b7d8bdf6b5.zip
cpython-f3078fbee2b6555f0f5b1819a231f4b7d8bdf6b5.tar.gz
cpython-f3078fbee2b6555f0f5b1819a231f4b7d8bdf6b5.tar.bz2
Fixes #13842: cannot pickle Ellipsis or NotImplemented.
Thanks for James Sanders for the bug report and the patch.
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r--Lib/test/pickletester.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index 1a551c8..3686a62 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -743,6 +743,18 @@ class AbstractPickleTests(unittest.TestCase):
u = self.loads(s)
self.assertEqual(t, u)
+ def test_ellipsis(self):
+ for proto in protocols:
+ s = self.dumps(..., proto)
+ u = self.loads(s)
+ self.assertEqual(..., u)
+
+ def test_notimplemented(self):
+ for proto in protocols:
+ s = self.dumps(NotImplemented, proto)
+ u = self.loads(s)
+ self.assertEqual(NotImplemented, u)
+
# Tests for protocol 2
def test_proto(self):