Skip to content

Commit

Permalink
Fix test by removing hard coded temp directory
Browse files Browse the repository at this point in the history
  • Loading branch information
notatallshaw committed Apr 18, 2024
1 parent 01e1a24 commit 5b44068
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/test_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ def test_falsey_path_none() -> None:
assert wc.cache_dir is None


def test_subdirectory_fragment() -> None:
def test_subdirectory_fragment(tmpdir: Path) -> None:
"""
Test the subdirectory URL fragment is part of the cache key.
"""
wc = WheelCache("/tmp/.foo/")
wc = WheelCache(os.fspath(tmpdir))
link1 = Link("git+https://g.c/o/r#subdirectory=d1")
link2 = Link("git+https://g.c/o/r#subdirectory=d2")
assert wc.get_path_for_link(link1) != wc.get_path_for_link(link2)
Expand Down

0 comments on commit 5b44068

Please sign in to comment.