Skip to content

Commit

Permalink
Updated the test for extract_zipped_paths to run correctly if test_ut…
Browse files Browse the repository at this point in the history
…ils.py is changed
  • Loading branch information
shivam-bangia committed Feb 9, 2025
1 parent f2a6ae5 commit 3b50ac0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,12 @@ def test_zipped_paths_extracted(self, tmpdir):
assert os.path.exists(extracted_path)
assert filecmp.cmp(extracted_path, __file__)

# If we don't remove the extracted_path at the end of the test case,
# any subsequent changes to the current file will cause this particular
# test case to fail, since the extract_zipped_paths function does not
# rewrite a file to the extracted_path if a file already exists there.
os.remove(extracted_path)

def test_invalid_unc_path(self):
path = r"\\localhost\invalid\location"
assert extract_zipped_paths(path) == path
Expand Down

0 comments on commit 3b50ac0

Please sign in to comment.