Skip to content

Commit

Permalink
Only run conda_tests session by default if user has conda installed (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
FollowTheProcess committed Dec 22, 2021
1 parent 8c017f5 commit 60babe8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions noxfile.py
Expand Up @@ -23,6 +23,11 @@

ON_WINDOWS_CI = "CI" in os.environ and platform.system() == "Windows"

# Skip 'conda_tests' if user doesn't have conda installed
nox.options.sessions = ["tests", "cover", "blacken", "lint", "docs"]
if shutil.which("conda"):
nox.options.sessions.append("conda_tests")


def is_python_version(session, version):
if not version.startswith(session.python):
Expand Down
1 change: 1 addition & 0 deletions tests/test_virtualenv.py
Expand Up @@ -233,6 +233,7 @@ def test_condaenv_bin_windows(make_conda):
assert [dir_.strpath, dir_.join("Scripts").strpath] == venv.bin_paths


@pytest.mark.skipif(not HAS_CONDA, reason="Missing conda command.")
def test_condaenv_(make_conda):
venv, dir_ = make_conda()
assert not venv.is_offline()
Expand Down

0 comments on commit 60babe8

Please sign in to comment.