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

Method check_huntrleaks

Lib/test/test_regrtest.py:1307–1318  ·  view source on GitHub ↗
(self, *, run_workers: bool)

Source from the content-addressed store, hash-verified

1305
1306 @unittest.skipUnless(support.Py_DEBUG, 'need a debug build')
1307 def check_huntrleaks(self, *, run_workers: bool):
1308 # test --huntrleaks
1309 code = textwrap.dedent("""
1310 import unittest
1311
1312 GLOBAL_LIST = []
1313
1314 class RefLeakTest(unittest.TestCase):
1315 def test_leak(self):
1316 GLOBAL_LIST.append(object())
1317 """)
1318 self.check_leak(code, 'references', run_workers=run_workers)
1319
1320 def test_huntrleaks(self):
1321 self.check_huntrleaks(run_workers=False)

Callers 2

test_huntrleaksMethod · 0.95
test_huntrleaks_mpMethod · 0.95

Calls 2

check_leakMethod · 0.95
dedentMethod · 0.45

Tested by

no test coverage detected