MCPcopy Index your code
hub / github.com/python/cpython / test_gc

Method test_gc

Lib/test/test_weakset.py:171–177  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

169 self.assertFalse(WeakSet() > WeakSet())
170
171 def test_gc(self):
172 # Create a nest of cycles to exercise overall ref count check
173 s = WeakSet(Foo() for i in range(1000))
174 for elem in s:
175 elem.cycle = s
176 elem.sub = elem
177 elem.set = WeakSet([elem])
178
179 def test_subclass_with_custom_hash(self):
180 # Bug #1257731

Callers

nothing calls this directly

Calls 2

WeakSetClass · 0.90
FooClass · 0.70

Tested by

no test coverage detected