avoid auto-updating conda in test env

because then we don't get the version we expect to test with!
This commit is contained in:
Min RK
2023-03-23 16:26:34 +01:00
parent 5ec167ff0f
commit 755d0d02fb

View File

@@ -57,6 +57,19 @@ def setup_conda(distro, version, prefix):
raise ValueError(f"{distro=} must be 'miniconda' or 'mambaforge'") raise ValueError(f"{distro=} must be 'miniconda' or 'mambaforge'")
with conda.download_miniconda_installer(installer_url, None) as installer_path: with conda.download_miniconda_installer(installer_url, None) as installer_path:
conda.install_miniconda(installer_path, str(prefix)) conda.install_miniconda(installer_path, str(prefix))
# avoid auto-updating conda when we install other packages
run(
[
str(prefix / "bin/conda"),
"config",
"--system",
"--set",
"auto_update_conda",
"false",
],
input="",
check=True,
)
@pytest.fixture @pytest.fixture