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 @@ -1452,6 +1452,32 @@ def test_run_lock_relative_source_path(
14521452 assert [p .resolve () for p in src_files ] == [environment .resolve ()]
14531453
14541454
1455+ @pytest .fixture
1456+ def conda_pip_conflict_environment (tmp_path : Path ):
1457+ return clone_test_dir ("test-conda-pip-conflict" , tmp_path ).joinpath (
1458+ "environment.yml"
1459+ )
1460+
1461+
1462+ def test_conda_pip_conflict (
1463+ monkeypatch : pytest .MonkeyPatch ,
1464+ conda_pip_conflict_environment : Path ,
1465+ conda_exe : str ,
1466+ ):
1467+ monkeypatch .chdir (conda_pip_conflict_environment .parent )
1468+ if is_micromamba (conda_exe ):
1469+ monkeypatch .setenv ("CONDA_FLAGS" , "-v" )
1470+ run_lock ([conda_pip_conflict_environment ], conda_exe = conda_exe )
1471+ lockfile = parse_conda_lock_file (
1472+ conda_pip_conflict_environment .parent / DEFAULT_LOCKFILE_NAME
1473+ )
1474+ clicks = []
1475+ for package in lockfile .package :
1476+ if package .name == "click" :
1477+ clicks .append (package )
1478+ assert len (clicks ) == 1
1479+
1480+
14551481@pytest .fixture
14561482def test_git_package_environment (tmp_path : Path ):
14571483 return clone_test_dir ("test-git-package" , tmp_path ).joinpath ("environment.yml" )
You can’t perform that action at this time.
0 commit comments