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 <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Oct 30, 2024
1 parent 827c8cf commit d52592c
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 @@ -380,10 +380,12 @@ def test_create(monkeypatch, make_one):
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 @@ -479,6 +481,8 @@ def test_stale_virtualenv_to_conda_environment(make_one):
def test_reuse_conda_environment(make_one):
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 d52592c

Please sign in to comment.