Skip to content

Commit

Permalink
Broken things broken
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Bargull <[email protected]>
  • Loading branch information
mbargull committed Nov 24, 2023
1 parent e721416 commit d8538da
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions tests/test_api_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1918,17 +1918,10 @@ def test_add_pip_as_python_dependency_from_condarc_file(
else:
check_build_fails = pytest.raises(subprocess.CalledProcessError)

import conda_build.index
# For conda<=23.10.0, ContextStack's pop/replace methods don't call self.apply.
from conda.base.context import context_stack

# Ensure conda_build.index.cached_index gets repopulated with altered index.
conda_build.index.local_index_timestamp = 0

if add_pip_as_python_dependency != context.add_pip_as_python_dependency:
# add_pip_as_python_dependency is not used as a key in SubdirData cache.
# => monkeypatch a new empty directory here to isolate this test.
import conda.core.subdir_data

monkeypatch.setattr(conda.core.subdir_data.SubdirData, "_cache_", {})
context_stack.apply()

conda_rc = Path(testing_workdir, ".condarc")
conda_rc.write_text(f"add_pip_as_python_dependency: {add_pip_as_python_dependency}")
Expand Down

0 comments on commit d8538da

Please sign in to comment.