MCPcopy Create free account
hub / github.com/RustPython/RustPython / test_container_iterator

Method test_container_iterator

Lib/test/test_set.py:354–364  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

352
353 @unittest.expectedFailure # TODO: RUSTPYTHON
354 def test_container_iterator(self):
355 # Bug #3680: tp_traverse was not implemented for set iterator object
356 class C(object):
357 pass
358 obj = C()
359 ref = weakref.ref(obj)
360 container = set([obj, 1])
361 obj.x = iter(container)
362 del obj, container
363 gc.collect()
364 self.assertTrue(ref() is None, "Cycle was not collected")
365
366 @unittest.expectedFailure # TODO: RUSTPYTHON
367 def test_free_after_iterating(self):

Callers

nothing calls this directly

Calls 5

setFunction · 0.85
iterFunction · 0.85
collectMethod · 0.80
assertTrueMethod · 0.80
CClass · 0.70

Tested by

no test coverage detected