fix: separate message parts with a colon

This commit is contained in:
Abdessamad Derraz committed 2026-10-17 20:47:22 +02:00
1 parent 0136d8a240
commit de8e7ff02e
5 files changed
+31 -15

No files matched your search

+17 -1
View File
@@ -2084,7 +2084,7 @@ class ACheckThatCannotAnswerDoesNotPass(unittest.TestCase):
encoding="utf-8"
)
self.assertIn(
'if report.get("error"):',
'if report.get("error") or pending(report):',
source.split("def main(")[-1],
"main() ignores the error the report carries",
)
@@ -3426,5 +3426,21 @@ class AutoFetchAsksVerifyWhatIsMissing(unittest.TestCase):
self.assertEqual(names, ["gone.bin", "bad.bin", "diabdat.mpq"])
class MessagesSeparateWithAColon(unittest.TestCase):
"""Em-dashes were replaced by " -" in messages: "bios/BLOOD.RFF -raze
says size mismatch" reads as a flag glued to a file name."""
PATTERN = re.compile(r"\} -[{a-z]")
def test_no_message_uses_a_dash_separator(self):
found = []
for path in [ROOT / "install.py", *sorted((ROOT / "scripts").rglob("*.py"))]:
for number, line in enumerate(path.read_text().splitlines(), 1):
if self.PATTERN.search(line):
found.append(f"{path.name}:{number}: {line.strip()}")
self.assertEqual(found, [])
if __name__ == "__main__":
unittest.main()
+1 -1
View File
@@ -472,7 +472,7 @@ class OneProfileSelector(unittest.TestCase):
f"{name} must ask common, not re-derive the refusal",
)
self.assertNotIn(
'is a launcher -use the emulator it launches', text,
'is a launcher: use the emulator it launches', text,
f"{name} still spells the refusal itself",
)