diff --git a/conda_pip/dependencies.py b/conda_pip/dependencies.py index 42b3889..856463f 100644 --- a/conda_pip/dependencies.py +++ b/conda_pip/dependencies.py @@ -21,7 +21,7 @@ keep_refs_alive = [] -def analyze_dependencies(*packages: str, prefer_on_conda=True, channel="conda-forge"): +def analyze_dependencies(*packages: str, prefer_on_conda=True, channel="conda-forge", backend="grayskull"): conda_deps = defaultdict(list) pypi_deps = defaultdict(list) for package in packages: diff --git a/tests/test_validate.py b/tests/test_validate.py index ada23f0..65507e4 100644 --- a/tests/test_validate.py +++ b/tests/test_validate.py @@ -18,15 +18,18 @@ def test_pip_required_in_target_env(tmp_env: TmpEnvFixture, conda_cli: CondaCLIF out, err, rc = conda_cli("install", "-p", prefix, "--yes", "python=3.9") PrefixData._cache_.clear() # clear cache to force re-read of prefix assert package_is_installed(str(prefix), "python=3.9") + assert not package_is_installed(str(prefix), "pip") + PrefixData._cache_.clear() with pytest.raises(CondaError, match="does not have pip installed"): out, err, rc = conda_cli(*args) out, err, rc = conda_cli("install", "-p", prefix, "--yes", "pip") PrefixData._cache_.clear() # clear cache to force re-read of prefix assert package_is_installed(str(prefix), "pip") + PrefixData._cache_.clear() out, err, rc = conda_cli(*args) - PrefixData._cache_.clear() # clear cache to force re-read of prefix + PrefixData._cache_.clear() assert rc == 0 assert package_is_installed(str(prefix), "requests") monkeypatch.undo()