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

Method test_get_objects

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

Source from the content-addressed store, hash-verified

896 self.assertEqual(gc.get_freeze_count(), 0)
897
898 def test_get_objects(self):
899 gc.collect()
900 l = []
901 l.append(l)
902 self.assertTrue(
903 any(l is element for element in gc.get_objects())
904 )
905
906 @requires_gil_enabled('need generational GC')
907 def test_get_objects_generations(self):

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected