Skip to content

Commit

Permalink
umu_test: update tests
Browse files Browse the repository at this point in the history
- Remove some assertions for the state of the compatibilitytools.d directory. Once an exception occurs, all files will automatically be cleaned up as the temporary directory is created as a context manager.
  • Loading branch information
R1kaB3rN committed Sep 16, 2024
1 parent 1ad8efd commit 8ef4b98
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions umu/umu_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,21 +639,7 @@ def test_latest_interrupt(self):
self.assertFalse(
self.env["PROTONPATH"], "Expected PROTONPATH to be empty"
)
self.assertFalse(result, "Expected None when a ValueError occurs")

# Verify the state of the compat dir/cache
self.assertFalse(
self.test_compat.joinpath(
self.test_archive.name[
: self.test_archive.name.find(".tar.gz")
]
).exists(),
"Expected Proton dir in compat to be cleaned",
)
self.assertFalse(
self.test_cache.joinpath(self.test_archive.name).exists(),
"Expected Proton dir in compat to be cleaned",
)
self.assertFalse(result, "Expected None on KeyboardInterrupt")

def test_latest_val_err(self):
"""Test _get_latest when something goes wrong when downloading Proton.
Expand Down Expand Up @@ -689,12 +675,6 @@ def test_latest_val_err(self):
)
self.assertFalse(result, "Expected None when a ValueError occurs")

# Ensure we clean up suspected files
self.assertFalse(
self.test_archive.is_file(),
"Expected test file in cache to be deleted",
)

def test_latest_offline(self):
"""Test _get_latest when the user doesn't have internet."""
result = None
Expand Down

0 comments on commit 8ef4b98

Please sign in to comment.