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

Method test_huntrleaks

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

Source from the content-addressed store, hash-verified

349 self.assertTrue(ns.runleaks)
350
351 def test_huntrleaks(self):
352 for opt in '-R', '--huntrleaks':
353 with self.subTest(opt=opt):
354 ns = self.parse_args([opt, ':'])
355 self.assertEqual(ns.huntrleaks, (5, 4, 'reflog.txt'))
356 ns = self.parse_args([opt, '6:'])
357 self.assertEqual(ns.huntrleaks, (6, 4, 'reflog.txt'))
358 ns = self.parse_args([opt, ':3'])
359 self.assertEqual(ns.huntrleaks, (5, 3, 'reflog.txt'))
360 ns = self.parse_args([opt, '6:3:leaks.log'])
361 self.assertEqual(ns.huntrleaks, (6, 3, 'leaks.log'))
362 self.checkError([opt], 'expected one argument')
363 self.checkError([opt, '6'],
364 'needs 2 or 3 colon-separated arguments')
365 self.checkError([opt, 'foo:'], 'invalid huntrleaks value')
366 self.checkError([opt, '6:foo'], 'invalid huntrleaks value')
367
368 def test_multiprocess(self):
369 for opt in '-j', '--multiprocess':

Callers

nothing calls this directly

Calls 4

parse_argsMethod · 0.95
checkErrorMethod · 0.95
subTestMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected