mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add test for added environment variable PRE_COMMIT_CONFIG_PATH
This commit is contained in:
parent
0a39f54c77
commit
bc89707d15
1 changed files with 11 additions and 0 deletions
|
|
@ -1233,3 +1233,14 @@ def test_pre_commit_env_variable_set(cap_out, store, repo_with_passing_hook):
|
|||
cap_out, store, repo_with_passing_hook, args, environ,
|
||||
)
|
||||
assert environ['PRE_COMMIT'] == '1'
|
||||
|
||||
|
||||
def test_pre_commit_config_path_env_variable_set(
|
||||
cap_out, store, repo_with_passing_hook,
|
||||
):
|
||||
args = run_opts()
|
||||
environ: MutableMapping[str, str] = {}
|
||||
ret, printed = _do_run(
|
||||
cap_out, store, repo_with_passing_hook, args, environ,
|
||||
)
|
||||
assert environ['PRE_COMMIT_CONFIG_PATH'] == repo_with_passing_hook
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue