mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Use match in the python script
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
This commit is contained in:
co-authored by
Daniel Hofstetter
parent
2f872860f0
commit
2bd7ee972c
+11
-10
@@ -103,16 +103,17 @@ def analyze_test_results(json_data):
|
||||
for test_name, result in tests.items():
|
||||
total_tests += 1
|
||||
|
||||
if result == "PASS":
|
||||
pass_count += 1
|
||||
elif result == "FAIL":
|
||||
fail_count += 1
|
||||
elif result == "SKIP":
|
||||
skip_count += 1
|
||||
elif result == "ERROR":
|
||||
error_count += 1
|
||||
elif result == "XPASS":
|
||||
xpass_count += 1
|
||||
match result:
|
||||
case "PASS":
|
||||
pass_count += 1
|
||||
case "FAIL":
|
||||
fail_count += 1
|
||||
case "SKIP":
|
||||
skip_count += 1
|
||||
case "ERROR":
|
||||
error_count += 1
|
||||
case "XPASS":
|
||||
xpass_count += 1
|
||||
|
||||
# Return the statistics
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user