Skip to content

Commit

Permalink
Add test for GH conda#408 PackageRecord error
Browse files Browse the repository at this point in the history
  • Loading branch information
maresb committed May 18, 2023
1 parent 4a667bd commit b2da1f1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test-git/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
channels:
- conda-forge
dependencies:
- git
platforms:
- osx-64
14 changes: 14 additions & 0 deletions tests/test_conda_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,20 @@ def test_run_lock_relative_source_path(
assert [p.resolve() for p in src_files] == [environment.resolve()]


@pytest.fixture
def test_git_environment(tmp_path: Path):
return clone_test_dir("test-git", tmp_path).joinpath("environment.yml")


def test_git_gh_408(
monkeypatch: pytest.MonkeyPatch, test_git_environment: Path, conda_exe: str
):
monkeypatch.chdir(test_git_environment.parent)
if is_micromamba(conda_exe):
monkeypatch.setenv("CONDA_FLAGS", "-v")
run_lock([test_git_environment], conda_exe=conda_exe)


def test_run_lock_with_pip(
monkeypatch: "pytest.MonkeyPatch", pip_environment: Path, conda_exe: str
):
Expand Down

0 comments on commit b2da1f1

Please sign in to comment.