Skip to content

Commit

Permalink
umu_test_plugins: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Oct 6, 2024
1 parent 76764b0 commit 5651f07
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions umu/umu_test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def test_build_command_entry(self):
toml_path = self.test_file + "/" + test_toml
result = None
test_command = []
test_runtime_platform = ("steamrt3", "sniper", "1628350")
Path(toml_path).touch()

# Mock the proton file
Expand Down Expand Up @@ -220,10 +221,13 @@ def test_build_command_entry(self):
# Mock setting up the runtime
# Don't copy _v2-entry-point
with (
patch.object(umu_runtime, "_install_umu", return_value=None),
patch.object(umu_runtime, "setup_umu", return_value=None),
):
umu_runtime.setup_umu(
self.test_user_share, self.test_local_share, None
self.test_user_share,
self.test_local_share,
test_runtime_platform,
None,
)
copytree(
Path(self.test_user_share, "sniper_platform_0.20240125.75305"),
Expand Down Expand Up @@ -272,6 +276,7 @@ def test_build_command_proton(self):
toml_path = self.test_file + "/" + test_toml
result = None
test_command = []
test_runtime_platform = ("steamrt3", "sniper", "1628350")
Path(toml_path).touch()

with Path(toml_path).open(mode="w", encoding="utf-8") as file:
Expand All @@ -298,7 +303,10 @@ def test_build_command_proton(self):
patch.object(umu_runtime, "_install_umu", return_value=None),
):
umu_runtime.setup_umu(
self.test_user_share, self.test_local_share, None
self.test_user_share,
self.test_local_share,
test_runtime_platform,
None,
)
copytree(
Path(self.test_user_share, "sniper_platform_0.20240125.75305"),
Expand Down Expand Up @@ -348,6 +356,7 @@ def test_build_command_toml(self):
toml_path = self.test_file + "/" + test_toml
result = None
test_command = []
test_runtime_platform = ("steamrt3", "sniper", "1628350")

Path(self.test_file + "/proton").touch()
Path(toml_path).touch()
Expand All @@ -373,10 +382,13 @@ def test_build_command_toml(self):

# Mock setting up the runtime
with (
patch.object(umu_runtime, "_install_umu", return_value=None),
patch.object(umu_runtime, "setup_umu", return_value=None),
):
umu_runtime.setup_umu(
self.test_user_share, self.test_local_share, None
self.test_user_share,
self.test_local_share,
test_runtime_platform,
None,
)
copytree(
Path(self.test_user_share, "sniper_platform_0.20240125.75305"),
Expand Down

0 comments on commit 5651f07

Please sign in to comment.