fix: spell out the checks under a missing file

Without --verbose each missing core file was followed by a bare '[size]'
line that told the reader nothing. It now reads 'validates size', the
verbose wording without the expected values.
This commit is contained in:
Abdessamad Derraz committed 2026-11-06 15:03:05 +01:00
1 parent c42bd0f688
commit f2132cc2c0
2 files changed
+22 -1

No files matched your search

+2 -1
View File
@@ -1809,7 +1809,8 @@ def _print_undeclared_entry(
ref_part = f" [{u['source_ref']}]" if u.get("source_ref") else ""
print(f" validates {checks_label}{ref_part}")
else:
print(f" [{'+'.join(checks)}]")
# A bare "[size]" under the entry said nothing to a reader.
print(f" validates {'+'.join(checks)}")
def _split_undeclared(undeclared: list[dict]) -> tuple[list[dict], list[dict], list[dict]]:
+20
View File
@@ -272,6 +272,26 @@ class TheBundledLineSaysWhatItLeavesOut(unittest.TestCase):
)
class TheCheckLineSaysWhatItIs(unittest.TestCase):
"""Without --verbose each missing core file was followed by a bare
'[size]' line, nine of them in verify --all."""
def test_the_checks_read_as_the_verbose_line(self):
import contextlib # noqa: PLC0415
import io # noqa: PLC0415
sys.path.insert(0, str(REPO_ROOT / "scripts"))
import verify # noqa: PLC0415
entry = {"name": "FBASIC30.ROM", "emulator": "XM7", "checks": ["size"]}
with contextlib.redirect_stdout(io.StringIO()) as out:
verify._print_undeclared_entry(entry, "MISSING (required)", False, set())
self.assertEqual(out.getvalue().splitlines(), [
" MISSING (required): XM7 needs FBASIC30.ROM",
" validates size",
])
class CoreCopiesWithoutAGapEntryAreCounted(unittest.TestCase):
"""verify --platform recalbox --system nec-pc-engine printed no Core
files line while the pack held six geargrafx syscard copies: the gap