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

Method test_get_objects_generations

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

Source from the content-addressed store, hash-verified

905
906 @requires_gil_enabled('need generational GC')
907 def test_get_objects_generations(self):
908 gc.collect()
909 l = []
910 l.append(l)
911 self.assertTrue(
912 any(l is element for element in gc.get_objects(generation=0))
913 )
914 gc.collect()
915 self.assertFalse(
916 any(l is element for element in gc.get_objects(generation=0))
917 )
918 del l
919 gc.collect()
920
921 def test_get_objects_arguments(self):
922 gc.collect()

Callers

nothing calls this directly

Calls 6

collectMethod · 0.80
assertTrueMethod · 0.80
get_objectsMethod · 0.80
assertFalseMethod · 0.80
anyFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected