From 615b96c4dcc398d85e2571a10f022c7a099de788 Mon Sep 17 00:00:00 2001 From: Marco Esters Date: Wed, 13 Nov 2024 17:19:02 -0800 Subject: [PATCH] Do not write directly into /root --- tests/test_uninstall.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_uninstall.py b/tests/test_uninstall.py index e7211ae..171212d 100644 --- a/tests/test_uninstall.py +++ b/tests/test_uninstall.py @@ -347,8 +347,9 @@ def test_uninstallation_remove_condarcs( check=True, text=True, ) - mock_system_paths["confighome"] = Path(proc.stdout.strip()) - user_condarc = mock_system_paths["confighome"] / ".condarc" + homedir = Path(proc.stdout.strip()) + mock_system_paths["confighome"] = homedir + user_condarc = homedir / ".config" / ".conda" / ".condarc" for condarc_file in (system_condarc, user_condarc): if needs_sudo: @@ -394,7 +395,7 @@ def test_uninstallation_remove_condarcs( finally: system_conda_dirs = [system_condarc.parent] if needs_sudo: - system_conda_dirs.append(mock_system_paths["confighome"] / ".condarc") + system_conda_dirs.append(mock_system_paths["confighome"] / ".config") for system_dir in system_conda_dirs: if not system_dir.exists(): continue