mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-27 22:27:21 -05:00
docs: state what each .info declares, not a grade
Ten profile notes graded a .info (correct, accurate, still, missing, omits). Each now says what the file declares and what the code reads. test_no_grade_on_another_projects_file reads every profile line that names a .info, core-info or System.dat.
This commit is contained in:
1 parent
0242dc77ee
commit
f4010bfd18
12 files changed
+38
-14
No files matched your search
@@ -225,6 +225,18 @@ class ProfilesStateFactsAboutOtherProjects(unittest.TestCase):
|
||||
re.IGNORECASE,
|
||||
)
|
||||
|
||||
# A line that names another project's file grades it when it calls the
|
||||
# file correct or accurate, says it still declares something, or that an
|
||||
# entry is missing from it or omitted. prosystem, retrodream,
|
||||
# fbalpha2012_neogeo and seven more profiles wrote it that way.
|
||||
OTHER_FILE = re.compile(r"(\.info\b|core-info|System\.dat)", re.IGNORECASE)
|
||||
GRADES = re.compile(
|
||||
r"\b(?:is (?:correct|accurate|inaccurate|outdated|stale)|accurate here|"
|
||||
r"correct:|still (?:declares|lists)|omits|missing (?:the|from))|"
|
||||
r"\.info missing",
|
||||
re.IGNORECASE,
|
||||
)
|
||||
|
||||
def test_profile_prose_and_comments(self):
|
||||
offenders = [
|
||||
f"{path.relative_to(ROOT)}: {line.strip()[:100]}"
|
||||
@@ -234,6 +246,15 @@ class ProfilesStateFactsAboutOtherProjects(unittest.TestCase):
|
||||
]
|
||||
self.assertEqual(offenders, [], "\n".join(offenders[:40]))
|
||||
|
||||
def test_no_grade_on_another_projects_file(self):
|
||||
offenders = [
|
||||
f"{path.relative_to(ROOT)}: {line.strip()[:100]}"
|
||||
for path in sorted((ROOT / "emulators").glob("*.yml"))
|
||||
for line in path.read_text(encoding="utf-8").splitlines()
|
||||
if self.OTHER_FILE.search(line) and self.GRADES.search(line)
|
||||
]
|
||||
self.assertEqual(offenders, [], "\n".join(offenders[:40]))
|
||||
|
||||
|
||||
class NoClauseSemicolons(unittest.TestCase):
|
||||
def _check(self, files: list[Path], extract) -> None:
|
||||
|
||||
Reference in new issue
Block a user