diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2017-01-11 17:41:28 +0000 |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2017-01-11 17:41:28 +0000 |
commit | 18a41f9ca5f1835f041dcf25d99b3a5195be66fb (patch) | |
tree | 1a63ef0fcfaa8e2fd9ba04db0f2cf18d8abd1df5 /Lib/test/test_marshal.py | |
parent | e949ac52e0cb36421bf7712eaba1aadedaa301d1 (diff) | |
parent | 19beb8e093de4933bd572a06fff7b1271e8d71dd (diff) | |
download | cpython-18a41f9ca5f1835f041dcf25d99b3a5195be66fb.tar.gz |
Issue #292Merged fixes from 3.5.
Diffstat (limited to 'Lib/test/test_marshal.py')
-rw-r--r-- | Lib/test/test_marshal.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_marshal.py b/Lib/test/test_marshal.py index c7def9a599..b378ffea00 100644 --- a/Lib/test/test_marshal.py +++ b/Lib/test/test_marshal.py @@ -135,6 +135,13 @@ class ContainerTestCase(unittest.TestCase, HelperMixin): for constructor in (set, frozenset): self.helper(constructor(self.d.keys())) + @support.cpython_only + def test_empty_frozenset_singleton(self): + # marshal.loads() must reuse the empty frozenset singleton + obj = frozenset() + obj2 = marshal.loads(marshal.dumps(obj)) + self.assertIs(obj2, obj) + class BufferTestCase(unittest.TestCase, HelperMixin): |