mirror of
https://github.com/tcsenpai/UWINE.git
synced 2025-06-06 11:35:20 +00:00
ulwgl_test: update test for PROTONPATH not set
- Remove the unnecessary statements and just simply assert the error in this case
This commit is contained in:
parent
0bbd251248
commit
a78ea7a12b
@ -1443,12 +1443,10 @@ class TestGameLauncher(unittest.TestCase):
|
||||
)
|
||||
|
||||
def test_env_proton_nodir(self):
|
||||
"""Test check_env when $PROTONPATH is not set on failing to setting it.
|
||||
"""Test check_env when $PROTONPATH in the case we failed to set it.
|
||||
|
||||
An FileNotFoundError should be raised when we fail to set PROTONPATH
|
||||
"""
|
||||
result = None
|
||||
|
||||
# Mock getting the Proton
|
||||
with self.assertRaises(FileNotFoundError):
|
||||
with patch.object(
|
||||
@ -1458,11 +1456,7 @@ class TestGameLauncher(unittest.TestCase):
|
||||
):
|
||||
os.environ["WINEPREFIX"] = self.test_file
|
||||
os.environ["GAMEID"] = self.test_file
|
||||
result = ulwgl_run.check_env(self.env)
|
||||
# Mock setting it on success
|
||||
os.environ["PROTONPATH"] = self.test_file
|
||||
self.assertTrue(result is self.env, "Expected the same reference")
|
||||
self.assertFalse(os.environ["PROTONPATH"])
|
||||
ulwgl_run.check_env(self.env)
|
||||
|
||||
def test_env_wine_dir(self):
|
||||
"""Test check_env when $WINEPREFIX is not a directory.
|
||||
|
Loading…
x
Reference in New Issue
Block a user