From e5aaecd225e540c4fa9f74a4bec4ba3c1ec46cc8 Mon Sep 17 00:00:00 2001 From: Marco Esters Date: Mon, 16 Sep 2024 09:47:28 -0700 Subject: [PATCH] Make assertions less restrictive --- tests/test_main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test_main.py b/tests/test_main.py index 4d4bb1d..ee21695 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -124,7 +124,13 @@ def test_conda_standalone_config(restrict_search_path, tmp_path, monkeypatch): conda_configs["recipe"] = config elif Path(filepath).exists(): conda_configs[filepath] = config - assert expected_configs == conda_configs + if restrict_search_path: + assert expected_configs == conda_configs + else: + # If the search path is restricted, there may be other .condarc + # files in the final config, so be less strict with assertions + for filepath, config in expected_configs.items(): + assert conda_configs.get(filepath) == config def test_extract_conda_pkgs(tmp_path: Path):