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

Method test_refleaks_in___init__

Lib/test/test_property.py:178–184  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

176
177 @support.refcount_test
178 def test_refleaks_in___init__(self):
179 gettotalrefcount = support.get_attribute(sys, 'gettotalrefcount')
180 fake_prop = property('fget', 'fset', 'fdel', 'doc')
181 refs_before = gettotalrefcount()
182 for i in range(100):
183 fake_prop.__init__('fget', 'fset', 'fdel', 'doc')
184 self.assertAlmostEqual(gettotalrefcount() - refs_before, 0, delta=10)
185
186 @support.refcount_test
187 def test_gh_115618(self):

Callers

nothing calls this directly

Calls 3

propertyClass · 0.85
__init__Method · 0.45
assertAlmostEqualMethod · 0.45

Tested by

no test coverage detected