MCPcopy Create free account
hub / github.com/RustPython/RustPython / test_refleaks_in___init__

Method test_refleaks_in___init__

Lib/test/test_zlib.py:1105–1111  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1103
1104 @support.refcount_test
1105 def test_refleaks_in___init__(self):
1106 gettotalrefcount = support.get_attribute(sys, 'gettotalrefcount')
1107 zlibd = zlib._ZlibDecompressor()
1108 refs_before = gettotalrefcount()
1109 for i in range(100):
1110 zlibd.__init__()
1111 self.assertAlmostEqual(gettotalrefcount() - refs_before, 0, delta=10)
1112
1113
1114class CustomInt:

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45
assertAlmostEqualMethod · 0.45

Tested by

no test coverage detected