mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Fixes #13842: cannot pickle Ellipsis or NotImplemented.
Thanks for James Sanders for the bug report and the patch.
This commit is contained in:
parent
e976fc7464
commit
f3078fbee2
4 changed files with 42 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue