diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-02-11 13:12:19 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-02-11 13:12:19 +0200 |
commit | 20ac73fb7133c119974eb21693d2621b09585ca0 (patch) | |
tree | c5cb3670b54a783d3a4328c5b189669c737ca594 /Lib/test/test_marshal.py | |
parent | c2154d6c07cab7d173204a5f157aea44175be7a0 (diff) | |
parent | 2b442f7d5b61dcefc5a7a18a6e7af9de5983790c (diff) | |
download | cpython-20ac73fb7133c119974eb21693d2621b09585ca0.tar.gz |
Issue #26325: Added test.support.check_no_resource_warning() to check that
no ResourceWarning is emitted.
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): |