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

Method test_replace_gc_tracked

Lib/test/test_structseq.py:359–366  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

357 """))
358
359 def test_replace_gc_tracked(self):
360 # Verify that __replace__ results are properly GC-tracked
361 time_struct = time.gmtime(0)
362 lst = []
363 replaced_struct = time_struct.__replace__(tm_year=lst)
364 lst.append(replaced_struct)
365
366 self.assertTrue(gc.is_tracked(replaced_struct))
367
368if __name__ == "__main__":
369 unittest.main()

Callers

nothing calls this directly

Calls 3

assertTrueMethod · 0.80
__replace__Method · 0.45
appendMethod · 0.45

Tested by

no test coverage detected