diff --git a/tests/test_config.py b/tests/test_config.py index 2beac9fe8d18cf3c6ba47e8f47227f02c5b6f025..0b45aae0802070e0b3c6f06e8b6b48c4f7261a2b 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -283,6 +283,13 @@ def test_cache_path_parent_conflict(tmp_path): config = config_mod.Config() assert config.cache_dir_path('TESTcache') is None +def test_relative_xdg_cache_home_ignored(tmp_path): + with update_environ(HOME=tmp_path, + XDG_CACHE_HOME='nonexistent/test/cache/directory/tree'): + config = config_mod.Config() + cache_dir_path = config.cache_dir_path('TESTcache') + assert cache_dir_path == tmp_path / '.cache/TESTcache' + def test_payment_threshold(): threshold = config_mod.Config().payment_threshold() assert threshold == 0