Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b408435

Browse files
committed
Issue #25220, libregrtest: Cleanup
No need to support.verbose in Regrtest.run_tests(), it's always set in runtest().
1 parent 6f20a2e commit b408435

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

Lib/test/libregrtest/main.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -310,17 +310,16 @@ def run_tests_sequential(self):
310310
if module not in save_modules and module.startswith("test."):
311311
support.unload(module)
312312

313-
def run_tests(self):
314-
support.verbose = self.ns.verbose # Tell tests to be moderately quiet
313+
def _test_forever(self, tests):
314+
while True:
315+
for test in tests:
316+
yield test
317+
if self.bad:
318+
return
315319

320+
def run_tests(self):
316321
if self.ns.forever:
317-
def test_forever(tests):
318-
while True:
319-
for test in tests:
320-
yield test
321-
if self.bad:
322-
return
323-
self.tests = test_forever(list(self.selected))
322+
self.tests = _test_forever(list(self.selected))
324323
self.test_count = ''
325324
self.test_count_width = 3
326325
else:

Lib/test/libregrtest/runtest_mp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def run_tests_slave(slaveargs):
6868
except BaseException as e:
6969
traceback.print_exc()
7070
result = CHILD_ERROR, str(e)
71+
7172
print() # Force a newline (just in case)
7273
print(json.dumps(result), flush=True)
7374
sys.exit(0)

0 commit comments

Comments
 (0)