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

Method test_refleaks_in___init__

Lib/test/test_bz2.py:1027–1033  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1025
1026 @support.refcount_test
1027 def test_refleaks_in___init__(self):
1028 gettotalrefcount = support.get_attribute(sys, 'gettotalrefcount')
1029 bzd = BZ2Decompressor()
1030 refs_before = gettotalrefcount()
1031 for i in range(100):
1032 bzd.__init__()
1033 self.assertAlmostEqual(gettotalrefcount() - refs_before, 0, delta=10)
1034
1035 def test_uninitialized_BZ2Decompressor_crash(self):
1036 self.assertEqual(BZ2Decompressor.__new__(BZ2Decompressor).

Callers

nothing calls this directly

Calls 3

BZ2DecompressorClass · 0.90
__init__Method · 0.45
assertAlmostEqualMethod · 0.45

Tested by

no test coverage detected