MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_collect_generations

Method test_collect_generations

Lib/test/test_gc.py:420–430  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

418
419 @refcount_test
420 def test_collect_generations(self):
421 gc.collect()
422 # This object will "trickle" into generation N + 1 after
423 # each call to collect(N)
424 x = []
425 gc.collect(0)
426 # x is now in the old gen
427 a, b, c = gc.get_count()
428 # We don't check a since its exact values depends on
429 # internal implementation details of the interpreter.
430 self.assertEqual((b, c), (1, 0))
431
432 def test_trashcan(self):
433 class Ouch:

Callers

nothing calls this directly

Calls 3

collectMethod · 0.80
get_countMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected