File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ # From @jamesmyatt:
2+ # <https://github.com/conda/conda-lock/issues/540#issuecomment-1843018053>
3+ channels :
4+ - conda-forge
5+ platforms :
6+ - linux-64
7+ dependencies :
8+ - python =3.12
9+ - click
10+ - pip :
11+ - click <8
Original file line number Diff line number Diff line change @@ -1478,6 +1478,32 @@ def test_run_lock_relative_source_path(
14781478 assert [p .resolve () for p in src_files ] == [environment .resolve ()]
14791479
14801480
1481+ @pytest .fixture
1482+ def conda_pip_conflict_environment (tmp_path : Path ):
1483+ return clone_test_dir ("test-conda-pip-conflict" , tmp_path ).joinpath (
1484+ "environment.yml"
1485+ )
1486+
1487+
1488+ def test_conda_pip_conflict (
1489+ monkeypatch : pytest .MonkeyPatch ,
1490+ conda_pip_conflict_environment : Path ,
1491+ conda_exe : str ,
1492+ ):
1493+ monkeypatch .chdir (conda_pip_conflict_environment .parent )
1494+ if is_micromamba (conda_exe ):
1495+ monkeypatch .setenv ("CONDA_FLAGS" , "-v" )
1496+ run_lock ([conda_pip_conflict_environment ], conda_exe = conda_exe )
1497+ lockfile = parse_conda_lock_file (
1498+ conda_pip_conflict_environment .parent / DEFAULT_LOCKFILE_NAME
1499+ )
1500+ clicks = []
1501+ for package in lockfile .package :
1502+ if package .name == "click" :
1503+ clicks .append (package )
1504+ assert len (clicks ) == 1
1505+
1506+
14811507@pytest .fixture
14821508def test_git_package_environment (tmp_path : Path ):
14831509 return clone_test_dir ("test-git-package" , tmp_path ).joinpath ("environment.yml" )
You can’t perform that action at this time.
0 commit comments