Skip to content

Commit

Permalink
TST: Cleaner local test usage
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoZeke committed Aug 20, 2023
1 parent 3ee954f commit 32bdfa0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,19 +407,19 @@ def test_environment_select():
# Virtualenv plugin fails on initialization if not available,
# so these tests pass only if virtualenv is present

conf.pythons = [PYTHON_VER1]
conf.pythons = [PYTHON_VER2]

# Check default python specifiers
environments = list(environment.get_environments(conf, ["conda", "virtualenv"]))
items = sorted((env.tool_name, env.python) for env in environments)
assert items == [('conda', '1.9'), ('conda', PYTHON_VER1), ('virtualenv', PYTHON_VER1)]
assert items == [('conda', '1.9'), ('conda', PYTHON_VER2), ('virtualenv', PYTHON_VER2)]

# Check specific python specifiers
environments = list(environment.get_environments(conf,
["conda:3.5",
"virtualenv:" + PYTHON_VER1]))
"virtualenv:" + PYTHON_VER2]))
items = sorted((env.tool_name, env.python) for env in environments)
assert items == [('conda', '3.5'), ('virtualenv', PYTHON_VER1)]
assert items == [('conda', '3.5'), ('virtualenv', PYTHON_VER2)]

# Check same specifier
environments = list(environment.get_environments(conf, ["existing:same", ":same", "existing"]))
Expand Down

0 comments on commit 32bdfa0

Please sign in to comment.