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

tests: skip test for conda env when conda isn't installed #794

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion tests/test_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import logging
import operator
import os
import shutil
import sys
import tempfile
from pathlib import Path
Expand All @@ -33,6 +34,9 @@
from nox import _options
from nox.logger import logger

HAS_CONDA = shutil.which("conda") is not None
has_conda = pytest.mark.skipif(not HAS_CONDA, reason="Missing conda command.")


def test__normalize_path():
envdir = "envdir"
Expand Down Expand Up @@ -946,7 +950,12 @@ def test__create_venv(self, create):
nox.virtualenv.VirtualEnv,
),
("nox.virtualenv.VirtualEnv.create", "venv", nox.virtualenv.VirtualEnv),
("nox.virtualenv.CondaEnv.create", "conda", nox.virtualenv.CondaEnv),
pytest.param(
"nox.virtualenv.CondaEnv.create",
"conda",
nox.virtualenv.CondaEnv,
marks=has_conda,
),
],
)
def test__create_venv_options(self, create_method, venv_backend, expected_backend):
Expand Down