diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-06-14 09:11:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-06-14 09:11:21 +0000 |
commit | cc9f06b22c7665893e6958f7518a9e8d258e7d98 (patch) | |
tree | 19c3ef54ef886a32df2f3ed7be2f694d77b50bfc /tests/store_test.py | |
parent | Adding upstream version 2.3.0. (diff) | |
download | pre-commit-cc9f06b22c7665893e6958f7518a9e8d258e7d98.tar.xz pre-commit-cc9f06b22c7665893e6958f7518a9e8d258e7d98.zip |
Adding upstream version 2.5.1.upstream/2.5.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/store_test.py')
-rw-r--r-- | tests/store_test.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/store_test.py b/tests/store_test.py index 5866616..6a4e900 100644 --- a/tests/store_test.py +++ b/tests/store_test.py @@ -25,7 +25,8 @@ def test_our_session_fixture_works(): def test_get_default_directory_defaults_to_home(): # Not we use the module level one which is not mocked ret = _get_default_directory() - assert ret == os.path.join(os.path.expanduser('~/.cache'), 'pre-commit') + expected = os.path.realpath(os.path.expanduser('~/.cache/pre-commit')) + assert ret == expected def test_adheres_to_xdg_specification(): @@ -33,7 +34,8 @@ def test_adheres_to_xdg_specification(): os.environ, {'XDG_CACHE_HOME': '/tmp/fakehome'}, ): ret = _get_default_directory() - assert ret == os.path.join('/tmp/fakehome', 'pre-commit') + expected = os.path.realpath('/tmp/fakehome/pre-commit') + assert ret == expected def test_uses_environment_variable_when_present(): @@ -41,7 +43,8 @@ def test_uses_environment_variable_when_present(): os.environ, {'PRE_COMMIT_HOME': '/tmp/pre_commit_home'}, ): ret = _get_default_directory() - assert ret == '/tmp/pre_commit_home' + expected = os.path.realpath('/tmp/pre_commit_home') + assert ret == expected def test_store_init(store): |