mirror of
https://github.com/uutils/coreutils.git
synced 2025-07-07 21:45:01 +00:00
Use match in the python script
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
This commit is contained in:
parent
2f872860f0
commit
2bd7ee972c
1 changed files with 11 additions and 10 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue