mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-18 17:33:30 -05:00
fix: check verify applies the flags it accepts
The mode and flag matrix only tests refusals, so a flag verify accepted and ignored, --verbose under --json, passed it. Each mode is now checked to change its output when that flag is given.
This commit is contained in:
1 parent
c28895ffdd
commit
1df23e3f7d
1 file changed
+14
@@ -71,6 +71,20 @@ class VerifyRefusesWhatAModeDoesNotRead(unittest.TestCase):
|
||||
self.assertEqual(seen, ["elsewhere"])
|
||||
|
||||
|
||||
class VerifyAppliesWhatItAccepts(unittest.TestCase):
|
||||
"""--verbose under --json was accepted in every mode and changed nothing;
|
||||
the refusal matrix above could not see it, since nothing was refused."""
|
||||
|
||||
def test_verbose_changes_the_json_in_every_mode(self):
|
||||
for mode in (("--platform", "bizhawk"), ("--emulator", "handy"),
|
||||
("--system", "atari-lynx")):
|
||||
with self.subTest(mode=mode):
|
||||
plain = _run("scripts/verify.py", *mode, "--json")
|
||||
verbose = _run("scripts/verify.py", *mode, "--json", "--verbose")
|
||||
self.assertEqual((plain.returncode, verbose.returncode), (0, 0))
|
||||
self.assertNotEqual(plain.stdout, verbose.stdout)
|
||||
|
||||
|
||||
class EmulatorPackReadsThePlatformsDir(unittest.TestCase):
|
||||
def test_the_registry_comes_from_the_given_dir(self):
|
||||
sys.path.insert(0, str(REPO_ROOT / "scripts"))
|
||||
|
||||
Reference in new issue
Block a user