From b40843546b1dc558da7217f8c0fe72fbca38e797 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 30 Sep 2015 02:39:22 +0200 Subject: [PATCH] Issue #25220, libregrtest: Cleanup No need to support.verbose in Regrtest.run_tests(), it's always set in runtest(). --- Lib/test/libregrtest/main.py | 17 ++++++++--------- Lib/test/libregrtest/runtest_mp.py | 1 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py index c102ee0e65d..fdb925d59d9 100644 --- a/Lib/test/libregrtest/main.py +++ b/Lib/test/libregrtest/main.py @@ -310,17 +310,16 @@ class Regrtest: if module not in save_modules and module.startswith("test."): support.unload(module) - def run_tests(self): - support.verbose = self.ns.verbose # Tell tests to be moderately quiet + def _test_forever(self, tests): + while True: + for test in tests: + yield test + if self.bad: + return + def run_tests(self): if self.ns.forever: - def test_forever(tests): - while True: - for test in tests: - yield test - if self.bad: - return - self.tests = test_forever(list(self.selected)) + self.tests = _test_forever(list(self.selected)) self.test_count = '' self.test_count_width = 3 else: diff --git a/Lib/test/libregrtest/runtest_mp.py b/Lib/test/libregrtest/runtest_mp.py index df075c101f8..6ed8dc2538a 100644 --- a/Lib/test/libregrtest/runtest_mp.py +++ b/Lib/test/libregrtest/runtest_mp.py @@ -68,6 +68,7 @@ def run_tests_slave(slaveargs): except BaseException as e: traceback.print_exc() result = CHILD_ERROR, str(e) + print() # Force a newline (just in case) print(json.dumps(result), flush=True) sys.exit(0)