mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-20 16:47:49 -06:00
refactor: name site tests by subject
The site test modules were cut by review pass (test_site_r2_css to test_site_r5_wiki): the passes of one subject become one module, and the modules that stood alone take the name of what they hold. The installer test classes named after a review take the name of what they test. One test left --manifest set for the tests after it, which the new order showed: it now resets the sources.
This commit is contained in:
1 parent
964812f977
commit
ccec5486e5
50 files changed
+7676
-8352
No files matched your search
@@ -261,6 +261,19 @@ class NoReviewTags(unittest.TestCase):
|
||||
offenders.append(f"{path.relative_to(ROOT)}:{number}")
|
||||
self.assertEqual(offenders, [], "\n".join(offenders[:20]))
|
||||
|
||||
def test_tests_are_named_by_subject(self):
|
||||
"""Test modules and classes were named after the review that wrote
|
||||
them (test_site_r4_p0, a class per review number). A name says what
|
||||
the test holds."""
|
||||
rounds = sorted(p.name for p in (ROOT / "tests").glob("test_*_r[0-9]_*.py"))
|
||||
self.assertEqual(rounds, [])
|
||||
classes = []
|
||||
for path in sorted((ROOT / "tests").glob("test_*.py")):
|
||||
for number, line in enumerate(path.read_text(encoding="utf-8").splitlines(), 1):
|
||||
if re.match(r"class Audit[A-Z]", line):
|
||||
classes.append(f"{path.name}:{number}")
|
||||
self.assertEqual(classes, [])
|
||||
|
||||
|
||||
class ProfilesStateFactsAboutOtherProjects(unittest.TestCase):
|
||||
"""A profile says what another project's file declares and what the code
|
||||
|
||||
Reference in new issue
Block a user