MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / test_adheres_to_xdg_specification

Function test_adheres_to_xdg_specification

tests/store_test.py:51–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49
50
51def test_adheres_to_xdg_specification():
52 with mock.patch.dict(
53 os.environ, {'XDG_CACHE_HOME': '/tmp/fakehome'},
54 ):
55 ret = _get_default_directory()
56 expected = os.path.realpath('/tmp/fakehome/pre-commit')
57 assert ret == expected
58
59
60def test_uses_environment_variable_when_present():

Callers

nothing calls this directly

Calls 1

_get_default_directoryFunction · 0.90

Tested by

no test coverage detected