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

Method test_get_objects

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected