From 8ef4b987ea92f4b11e03607ceb74e9e29ea8468a Mon Sep 17 00:00:00 2001 From: R1kaB3rN <100738684+R1kaB3rN@users.noreply.github.com> Date: Mon, 16 Sep 2024 12:37:06 -0700 Subject: [PATCH] umu_test: update tests - 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. --- umu/umu_test.py | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/umu/umu_test.py b/umu/umu_test.py index da3b98d14..f39401e00 100644 --- a/umu/umu_test.py +++ b/umu/umu_test.py @@ -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. @@ -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