Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into count-branches
  • Loading branch information
gvanrossum committed Sep 11, 2023
commit d74670c02444a7fa8559be3248c2484f07c3e2bb
14 changes: 10 additions & 4 deletions Lib/test/test_regrtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
import unittest
from test import support
from test.support import os_helper, TestStats, without_optimizer
from test.libregrtest import utils, setup
from test.libregrtest.runtest import normalize_test_name
from test.libregrtest import cmdline
from test.libregrtest import utils
from test.libregrtest import setup
from test.libregrtest.utils import normalize_test_name

if not support.has_subprocess_support:
raise unittest.SkipTest("test module requires subprocess")
Expand Down Expand Up @@ -1017,12 +1019,16 @@ def test_run(self):
forever=True)

@without_optimizer
def check_leak(self, code, what):
def check_leak(self, code, what, *, multiprocessing=False):
test = self.create_test('huntrleaks', code=code)

filename = 'reflog.txt'
self.addCleanup(os_helper.unlink, filename)
output = self.run_tests('--huntrleaks', '3:3:', test,
cmd = ['--huntrleaks', '3:3:']
if multiprocessing:
cmd.append('-j1')
cmd.append(test)
output = self.run_tests(*cmd,
exitcode=EXITCODE_BAD_TEST,
stderr=subprocess.STDOUT)
self.check_executed_tests(output, [test], failed=test, stats=1)
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.