mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 01:51:46 +04:00
Add integration test for existing install behaviour
This commit is contained in:
parent
332e8b480b
commit
4b43fd8cdc
4 changed files with 60 additions and 1 deletions
|
|
@ -31,6 +31,14 @@ def test_get_default_directory_defaults_to_home():
|
|||
assert ret == os.path.join(os.environ['HOME'], '.pre-commit')
|
||||
|
||||
|
||||
def test_uses_environment_variable_when_present():
|
||||
with mock.patch.dict(
|
||||
os.environ, {'PRE_COMMIT_HOME': '/tmp/pre_commit_home'}
|
||||
):
|
||||
ret = _get_default_directory()
|
||||
assert ret == '/tmp/pre_commit_home'
|
||||
|
||||
|
||||
def test_store_require_created(store):
|
||||
assert not os.path.exists(store.directory)
|
||||
store.require_created()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue