From bc89707d15ff6806876c7689a83853f367578753 Mon Sep 17 00:00:00 2001 From: Christian Taedcke Date: Fri, 29 Nov 2024 10:43:55 +0100 Subject: [PATCH] Add test for added environment variable PRE_COMMIT_CONFIG_PATH --- tests/commands/run_test.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/commands/run_test.py b/tests/commands/run_test.py index 50a20f37..04004915 100644 --- a/tests/commands/run_test.py +++ b/tests/commands/run_test.py @@ -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