Skip to content

Commit 05487ea

Browse files
MyreMylarStarbuck5
authored andcommitted
Fix for CPython change in way skipped tests counted
1 parent db658cc commit 05487ea

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/test_utils/test_runner.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,17 @@ def run_test(
285285
print(output.read())
286286
output.seek(0)
287287

288+
# change in way skipped tested counted from Python 3.12.1 onwards
289+
tests_run_and_skipped = results.testsRun
290+
if sys.version_info.minor >= 13 or (
291+
sys.version_info.minor == 12 and sys.version_info.micro >= 1
292+
):
293+
tests_run_and_skipped += len(results.skipped)
294+
288295
results = {
289296
module: {
290297
"output": output.getvalue(),
291-
"num_tests": results.testsRun,
298+
"num_tests": tests_run_and_skipped,
292299
"num_errors": len(results.errors),
293300
"num_failures": len(results.failures),
294301
}

0 commit comments

Comments
 (0)