Skip to content

Commit

Permalink
umu_test: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Sep 14, 2024
1 parent 5a1ed6b commit fb6d77f
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions umu/umu_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,9 @@ def test_run_command(self):
umu_run,
"Popen",
) as mock_popen,
patch.object(
umu_run, "get_gamescope_baselayer_order", return_value=None
),
):
mock_proc = MagicMock()
mock_proc.__enter__.return_value = mock_proc
mock_proc.wait.return_value = 0
mock_proc.pid = 1234
mock_popen.return_value = mock_proc
Expand All @@ -245,18 +243,12 @@ def test_run_command(self):
self.assertEqual(
result,
0,
"Expected 0 status code when libc could not be found",
"Expected 0 status code",
)


def test_run_command_none(self):
"""Test run_command when passed an empty tuple or None."""
with (
self.assertRaises(ValueError),
patch.object(
umu_run, "get_gamescope_baselayer_order", return_value=None
),
):
with self.assertRaises(ValueError):
umu_run.run_command(())
umu_run.run_command(None)

Expand Down

0 comments on commit fb6d77f

Please sign in to comment.