--- Lib/test/regrtest.py +++ Lib/test/regrtest.py @@ -531,10 +531,10 @@ try: result = runtest(*args, **kwargs) except KeyboardInterrupt: - result = INTERRUPTED, '' + result = INTERRUPTED, 0.0 except BaseException as e: traceback.print_exc() - result = CHILD_ERROR, str(e) + result = CHILD_ERROR, 0.0, str(e) sys.stdout.flush() print() # Force a newline (just in case) print(json.dumps(result)) @@ -644,7 +644,7 @@ save_modules = sys.modules.keys() def accumulate_result(test, result): - ok, test_time = result + ok, test_time = result[:2] test_times.append((test_time, test)) if ok == PASSED: good.append(test) @@ -698,7 +698,7 @@ stderr = debug_output_pat.sub("", stderr) stdout, _, result = stdout.strip().rpartition("\n") if retcode != 0: - result = (CHILD_ERROR, "Exit code %s" % retcode) + result = (CHILD_ERROR, 0.0, "Exit code %s" % retcode) output.put((test, stdout.rstrip(), stderr.rstrip(), result)) return if not result: @@ -735,7 +735,7 @@ if result[0] == INTERRUPTED: raise KeyboardInterrupt if result[0] == CHILD_ERROR: - raise Exception("Child error on {}: {}".format(test, result[1])) + raise Exception("Child error on {}: {}".format(test, result[2])) test_index += 1 except KeyboardInterrupt: interrupted = True