Skip to content

Commit

Permalink
Fix clone integration test on macOS
Browse files Browse the repository at this point in the history
On machines where $TMPDIR is a symlink (e.g. macOS, where $TMPDIR is
/var/folders/... but /var is a symlink to private/var), this test would
incorrectly fail. Resolving the temporary directory's path avoids this.
  • Loading branch information
sersorrel committed Jan 19, 2024
1 parent 6d25b08 commit 16e49df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/integration/test_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def test_clone() -> None:
ad = new_test_artifacts()
artifacts: Artifacts = ad["artifacts"]
path = artifacts.repo.path
assert path.startswith(ad["temp_dir"].name)
tdir = str(Path(ad["temp_dir"].name).resolve())
assert path.startswith(tdir)

shutil.rmtree(ad["temp_dir"].name)
assert os.path.isdir(path) is False
Expand Down

0 comments on commit 16e49df

Please sign in to comment.