1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

Use match in the python script

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
This commit is contained in:
Sylvestre Ledru 2025-03-17 11:51:22 +01:00 committed by GitHub
parent 2f872860f0
commit 2bd7ee972c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -103,16 +103,17 @@ def analyze_test_results(json_data):
for test_name, result in tests.items(): for test_name, result in tests.items():
total_tests += 1 total_tests += 1
if result == "PASS": match result:
pass_count += 1 case "PASS":
elif result == "FAIL": pass_count += 1
fail_count += 1 case "FAIL":
elif result == "SKIP": fail_count += 1
skip_count += 1 case "SKIP":
elif result == "ERROR": skip_count += 1
error_count += 1 case "ERROR":
elif result == "XPASS": error_count += 1
xpass_count += 1 case "XPASS":
xpass_count += 1
# Return the statistics # Return the statistics
return { return {