From 32841b9ab6a9d51553494b6a49bedd69c1f499ac Mon Sep 17 00:00:00 2001 From: Daniel Johnson Date: Sat, 16 Dec 2023 11:27:42 -0500 Subject: [PATCH] Fix up the PCX2 test, so it will work even though PCSX2 is not there. This isn't as fancy as MagicMock, but I need to stub out a couple of functions in the runner being testing, so MagicMock doesn't work. --- tests/runners/test_pcsx2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/runners/test_pcsx2.py b/tests/runners/test_pcsx2.py index 392dfdea2..f28424fc5 100644 --- a/tests/runners/test_pcsx2.py +++ b/tests/runners/test_pcsx2.py @@ -8,6 +8,8 @@ class TestPCSX2Runner(unittest.TestCase): def setUp(self): self.runner = pcsx2() + self.runner.get_executable = lambda: "pcsx2" + self.runner.get_command = lambda: ["pcsx2"] @patch('os.path.isfile') def test_play_iso_does_not_exist(self, mock_isfile):