diff options
author | Andy Freeland <andy.freeland@redjack.com> | 2015-09-23 23:05:13 -0400 |
---|---|---|
committer | Andy Freeland <andy.freeland@redjack.com> | 2015-09-29 16:01:31 -0400 |
commit | 6be4627f89d668647f11695d381fce8e451f8269 (patch) | |
tree | 7186c7984003df3b277d545d2421d81c93b78ba0 | |
parent | e78df3e069e41deb85a465dd4dc469cdc264a6e3 (diff) | |
download | pip-6be4627f89d668647f11695d381fce8e451f8269.tar.gz |
Failing test case for #2996
-rw-r--r-- | tests/unit/test_appdirs.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/unit/test_appdirs.py b/tests/unit/test_appdirs.py index 51f51e21e..4c0710dd4 100644 --- a/tests/unit/test_appdirs.py +++ b/tests/unit/test_appdirs.py @@ -44,6 +44,14 @@ class TestUserCacheDir: assert appdirs.user_cache_dir("pip") == "/home/test/.other-cache/pip" + def test_user_cache_dir_linux_home_slash(self, monkeypatch): + # Verify that we are not affected by http://bugs.python.org/issue14768 + monkeypatch.delenv("XDG_CACHE_HOME") + monkeypatch.setenv("HOME", "/") + monkeypatch.setattr(sys, "platform", "linux2") + + assert appdirs.user_cache_dir("pip") == "/.cache/pip" + class TestSiteConfigDirs: @@ -154,6 +162,14 @@ class TestUserDataDir: assert appdirs.user_data_dir("pip") == "/home/test/.other-share/pip" + def test_user_data_dir_linux_home_slash(self, monkeypatch): + # Verify that we are not affected by http://bugs.python.org/issue14768 + monkeypatch.delenv("XDG_DATA_HOME") + monkeypatch.setenv("HOME", "/") + monkeypatch.setattr(sys, "platform", "linux2") + + assert appdirs.user_data_dir("pip") == "/.local/share/pip" + class TestUserConfigDir: @@ -213,3 +229,11 @@ class TestUserConfigDir: monkeypatch.setattr(sys, "platform", "linux2") assert appdirs.user_config_dir("pip") == "/home/test/.other-config/pip" + + def test_user_config_dir_linux_home_slash(self, monkeypatch): + # Verify that we are not affected by http://bugs.python.org/issue14768 + monkeypatch.delenv("XDG_CONFIG_HOME") + monkeypatch.setenv("HOME", "/") + monkeypatch.setattr(sys, "platform", "linux2") + + assert appdirs.user_config_dir("pip") == "/.config/pip" |