fix: refresh_stale knows the romfolders area

check_freshness gained a romfolders area and refresh_stale did not:
its rows were dropped from a saved report without a word, and --only
romfolders was refused. A rom-folder pin is moved by hand, so the area
is listed for a human, a test holds the two area lists equal, and the
--only help names every area.
This commit is contained in:
Abdessamad Derraz committed 2026-11-06 08:56:14 +01:00
1 parent ea58f6f5ce
commit 8b7e5ceef4
3 files changed
+22 -4

No files matched your search

+10
View File
@@ -256,6 +256,16 @@ class SavedFindings(unittest.TestCase):
[("catalogs", "mame recipes")])
self.assertEqual([f["subject"] for f in plan["surfaced"]], ["anybor"])
def test_every_area_check_freshness_reports_is_known(self):
"""romfolders was added to check_freshness and not here: its rows
were dropped from a saved report without a word, and --only
romfolders was refused."""
import check_freshness # noqa: PLC0415
self.assertEqual(set(check_freshness.AREAS), set(rs.AUTO_AREAS + rs.MANUAL_AREAS))
jobs, surfaced, _ = rs.plan_jobs([finding("romfolders", "muos")], REGISTRY, {})
self.assertEqual((jobs, [f["subject"] for f in surfaced]), ([], ["muos"]))
def test_a_report_that_is_not_a_list_is_refused(self):
with tempfile.TemporaryDirectory(dir=REPO_ROOT / "tmp" / "tests") as directory:
path = Path(directory) / "freshness.json"