mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-119050: Add XML support to libregrtest refleak checker (#119148)
regrtest test runner: Add XML support to the refleak checker (-R option). * run_unittest() now stores XML elements as string, rather than objects, in support.junit_xml_list. * runtest_refleak() now saves/restores XML strings before/after checking for reference leaks. Save XML into a temporary file.
This commit is contained in:
parent
bf17986096
commit
9257731f5d
5 changed files with 39 additions and 25 deletions
|
@ -473,15 +473,6 @@ class ParseArgsTestCase(unittest.TestCase):
|
|||
self.assertEqual(regrtest.hunt_refleak.runs, 10)
|
||||
self.assertFalse(regrtest.output_on_failure)
|
||||
|
||||
def test_xml_huntrleaks(self):
|
||||
args = ['-R', '3:12', '--junit-xml', 'output.xml']
|
||||
with support.captured_stderr():
|
||||
regrtest = self.create_regrtest(args)
|
||||
self.assertIsNotNone(regrtest.hunt_refleak)
|
||||
self.assertEqual(regrtest.hunt_refleak.warmups, 3)
|
||||
self.assertEqual(regrtest.hunt_refleak.runs, 12)
|
||||
self.assertIsNone(regrtest.junit_filename)
|
||||
|
||||
|
||||
@dataclasses.dataclass(slots=True)
|
||||
class Rerun:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue