diff --git a/news/118-skip-uninstallation-caches-test b/news/118-skip-uninstallation-caches-test new file mode 100644 index 0000000..b6ab7e8 --- /dev/null +++ b/news/118-skip-uninstallation-caches-test @@ -0,0 +1,19 @@ +### Enhancements + +* + +### Bug fixes + +* Skip `test_uninstallation_remove_caches` if not on CI or if `CONDA_PKGS_DIRS` is set. (#118) + +### Deprecations + +* + +### Docs + +* + +### Other + +* diff --git a/tests/test_uninstall.py b/tests/test_uninstall.py index 9294251..f6d7bf9 100644 --- a/tests/test_uninstall.py +++ b/tests/test_uninstall.py @@ -297,11 +297,14 @@ def _shortcuts_found(shortcut_env: Path) -> list: (True, False), ids=("shared pkgs", "remove pkgs"), ) +@pytest.mark.skipif(not ON_CI, reason="CI only - may remove shared caches") def test_uninstallation_remove_caches( mock_system_paths: dict[str, Path], tmp_env: TmpEnvFixture, shared_pkgs: bool, ): + if "CONDA_PKGS_DIRS" in os.environ: + pytest.skip("Test will fail with CONDA_PKGS_DIRS set.") # Set up notices if ON_WIN: try: