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 17, 2024
1 parent 976c5ed commit 83da71a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/test_cache.py
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 83da71a

Please sign in to comment.