From 755d0d02fbe4cbbc0fff2ca7cdc17ed7220c3fa7 Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 23 Mar 2023 16:26:34 +0100 Subject: [PATCH] avoid auto-updating conda in test env because then we don't get the version we expect to test with! --- tests/test_installer.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_installer.py b/tests/test_installer.py index 97524d6..861c947 100644 --- a/tests/test_installer.py +++ b/tests/test_installer.py @@ -57,6 +57,19 @@ def setup_conda(distro, version, prefix): raise ValueError(f"{distro=} must be 'miniconda' or 'mambaforge'") with conda.download_miniconda_installer(installer_url, None) as installer_path: 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