Skip to content

Commit

Permalink
ulwgl_test.py: update tests for set_env
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Feb 13, 2024
1 parent 1dbcace commit d5772c0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ulwgl_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ def test_set_env_toml(self):
def test_set_env_opts(self):
"""Test set_env.
Ensure no failures and verify options are passed
Ensure no failures and verify that an option is passed to the executable
"""
result = None
test_str = "foo"
Expand All @@ -643,11 +643,15 @@ def test_set_env_opts(self):
# Args
result = ulwgl_run.parse_args()
self.assertIsInstance(result, tuple, "Expected a tuple")
self.assertIsInstance(result[0], str, "Expected a string")
self.assertIsInstance(result[1], list, "Expected a list as options")
self.assertEqual(
result[0], "./tmp.WMYQiPb9A/foo", "Expected EXE to be unexpanded"
)
self.assertEqual(
*result[1], test_str, "Expected the test string when passed as an option"
*result[1],
test_str,
"Expected the test string when passed as an option",
)
# Check
ulwgl_run.check_env(self.env)
Expand Down Expand Up @@ -676,7 +680,6 @@ def test_set_env_opts(self):
"Expected PROTON_VERB to be set",
)


def test_set_env(self):
"""Test set_env.
Expand All @@ -695,6 +698,8 @@ def test_set_env(self):
# Args
result = ulwgl_run.parse_args()
self.assertIsInstance(result, tuple, "Expected a tuple")
self.assertIsInstance(result[0], str, "Expected a string")
self.assertIsInstance(result[1], list, "Expected a list as options")
self.assertEqual(
result[0], "./tmp.WMYQiPb9A/foo", "Expected EXE to be unexpanded"
)
Expand Down

0 comments on commit d5772c0

Please sign in to comment.