mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 01:53:56 -06:00
fix: write every platform count in the summary
A platform with one entry had no number, so the named counts did not add up to the total (finding 81).
This commit is contained in:
1 parent
d38cd58036
commit
6e77da4b82
3 files changed
+15
-4
No files matched your search
+1
-2
@@ -2961,8 +2961,7 @@ def _overall_summary(group_results: list[tuple[dict, list[str]]]) -> str:
|
||||
platforms = sum(len(group) for _, group in group_results)
|
||||
|
||||
def where(counts: dict[str, int]) -> str:
|
||||
named = [f"{name} {count}" if count > 1 else name
|
||||
for name, count in counts.items() if count]
|
||||
named = [f"{name} {count}" for name, count in counts.items() if count]
|
||||
return f" ({', '.join(named)})" if named else ""
|
||||
|
||||
parts = []
|
||||
|
||||
@@ -4830,7 +4830,7 @@ class VerifyAllSummaryNamesWhatIsWrong(unittest.TestCase):
|
||||
summary = verify._overall_summary(
|
||||
[(clean, ["RetroArch"]), (warned, ["RetroDECK"]), (core_miss, ["ROCKNIX"])]
|
||||
)
|
||||
self.assertIn("1 warning (RetroDECK)", summary)
|
||||
self.assertIn("1 warning (RetroDECK 1)", summary)
|
||||
self.assertIn("ROCKNIX: n64.psh", summary)
|
||||
self.assertIn("0 critical,", summary)
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ class TheVerifySummaryCountsDiscrepancies(unittest.TestCase):
|
||||
({"severity_counts": {}, "details": details}, ["RetroArch"]),
|
||||
({"severity_counts": {}, "details": []}, ["Batocera"]),
|
||||
])
|
||||
self.assertIn("1 discrepancy (RetroArch)", summary)
|
||||
self.assertIn("1 discrepancy (RetroArch 1)", summary)
|
||||
|
||||
def test_a_shared_destination_names_the_path_and_both_sides(self):
|
||||
result = {"name": "disk.rom", "status": verify.Status.UNTESTED}
|
||||
@@ -145,6 +145,18 @@ class TheVerifySummaryCountsDiscrepancies(unittest.TestCase):
|
||||
self.assertIn(part, message)
|
||||
|
||||
|
||||
class EveryPlatformInTheSummaryCarriesItsCount(unittest.TestCase):
|
||||
"""'17 discrepancies (Lakka 5, RetroArch 5, RetroBat 2, RetroDECK 4,
|
||||
ROCKNIX)': the one platform with a single entry had no number, and the
|
||||
named counts did not add up to the total."""
|
||||
|
||||
def test_a_count_of_one_is_written(self):
|
||||
one = {"severity_counts": {verify.Severity.WARNING: 1}, "details": []}
|
||||
two = {"severity_counts": {verify.Severity.WARNING: 2}, "details": []}
|
||||
summary = verify._overall_summary([(two, ["Lakka"]), (one, ["ROCKNIX"])])
|
||||
self.assertIn("3 warning (Lakka 2, ROCKNIX 1)", summary)
|
||||
|
||||
|
||||
class OneSpellingPerOption(unittest.TestCase):
|
||||
"""verify.py -p batocera worked and slots.py -p batocera was refused."""
|
||||
|
||||
|
||||
Reference in new issue
Block a user