From f0c1e0c0be82e41185003913844ddf8efc060f32 Mon Sep 17 00:00:00 2001 From: Nate Prewitt Date: Sun, 29 Mar 2026 15:50:38 -0600 Subject: [PATCH] Cleanup extracted file after extract_zipped_path test --- tests/test_utils.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index c477c4089a..31ba00c95e 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -361,9 +361,12 @@ def test_zipped_paths_extracted(self, tmpdir): zipped_path = os.path.join(zipped_py.strpath, name.lstrip(r"\/")) extracted_path = extract_zipped_paths(zipped_path) - assert extracted_path != zipped_path - assert os.path.exists(extracted_path) - assert filecmp.cmp(extracted_path, __file__) + try: + assert extracted_path != zipped_path + assert os.path.exists(extracted_path) + assert filecmp.cmp(extracted_path, __file__) + finally: + os.remove(extracted_path) def test_invalid_unc_path(self): path = r"\\localhost\invalid\location"