Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip conda_tests session by default if user does not have conda #521

Merged
merged 3 commits into from Dec 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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