Skip to content

Commit

Permalink
tests: add extra check to cover bin_paths
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii committed Nov 23, 2024
1 parent f05f9e4 commit 9fe8f05
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,12 @@ def test_create(
assert dir_.join("Scripts", "python.exe").check()
assert dir_.join("Scripts", "pip.exe").check()
assert dir_.join("Lib").check()
assert str(dir_.join("Scripts")) in venv.bin_paths
else:
assert dir_.join("bin", "python").check()
assert dir_.join("bin", "pip").check()
assert dir_.join("lib").check()
assert str(dir_.join("bin")) in venv.bin_paths

# Test running create on an existing environment. It should be deleted.
dir_.ensure("test.txt")
Expand Down Expand Up @@ -557,6 +559,8 @@ def test_reuse_conda_environment(
) -> None:
venv, _ = make_one(reuse_existing=True, venv_backend="conda")
venv.create()
assert venv.bin_paths
assert venv.bin_paths[-1].endswith("bin")

venv, _ = make_one(reuse_existing=True, venv_backend="conda")
reused = not venv.create()
Expand Down

0 comments on commit 9fe8f05

Please sign in to comment.