mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-10 13:33:24 -05:00
fix: count variant choices made through validated_choice
This commit is contained in:
1 parent
79cdbc24cf
commit
70d6f431e3
1 file changed
+4
-2
@@ -81,8 +81,10 @@ class OneImplementation(unittest.TestCase):
|
|||||||
for name in ("verify.py", "generate_pack.py"):
|
for name in ("verify.py", "generate_pack.py"):
|
||||||
source = (REPO_ROOT / "scripts" / name).read_text(encoding="utf-8")
|
source = (REPO_ROOT / "scripts" / name).read_text(encoding="utf-8")
|
||||||
with self.subTest(module=name):
|
with self.subTest(module=name):
|
||||||
self.assertGreaterEqual(len(re.findall(r"find_validated_variant\(", source)), 2
|
# Directly or through validated_choice, the one place that
|
||||||
if name == "generate_pack.py" else 3)
|
# picks the variant a destination ships.
|
||||||
|
calls = re.findall(r"(?:find_validated_variant|validated_choice)\(", source)
|
||||||
|
self.assertGreaterEqual(len(calls), 2 if name == "generate_pack.py" else 3)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in new issue
Block a user