mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-40521: Empty frozenset is no longer a singleton (GH-21085)
* Revert "bpo-40521: Make the empty frozenset per interpreter (GH-21068)"
This reverts commit 261cfedf76
.
* bpo-40521: Empty frozensets are no longer singletons
* Complete the removal of the frozenset singleton
This commit is contained in:
parent
522691c46e
commit
f9bd05e83e
8 changed files with 8 additions and 54 deletions
|
@ -158,13 +158,6 @@ 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):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue