diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 04:23:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 04:24:09 +0000 |
commit | 1968ada2d36e4508ef787e57f0e5f63214bcbad7 (patch) | |
tree | 69c01b5108b09faafa39e56ae48add8a2439f9db /tests/commands/run_test.py | |
parent | Releasing debian version 2.14.0-2. (diff) | |
download | pre-commit-1968ada2d36e4508ef787e57f0e5f63214bcbad7.tar.xz pre-commit-1968ada2d36e4508ef787e57f0e5f63214bcbad7.zip |
Merging upstream version 2.15.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/commands/run_test.py')
-rw-r--r-- | tests/commands/run_test.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/commands/run_test.py b/tests/commands/run_test.py index da7569e..8c15395 100644 --- a/tests/commands/run_test.py +++ b/tests/commands/run_test.py @@ -504,6 +504,15 @@ def test_is_squash_merge(cap_out, store, repo_with_passing_hook): assert environ['PRE_COMMIT_IS_SQUASH_MERGE'] == '1' +def test_rewrite_command(cap_out, store, repo_with_passing_hook): + args = run_opts(rewrite_command='amend') + environ: MutableMapping[str, str] = {} + ret, printed = _do_run( + cap_out, store, repo_with_passing_hook, args, environ, + ) + assert environ['PRE_COMMIT_REWRITE_COMMAND'] == 'amend' + + def test_checkout_type(cap_out, store, repo_with_passing_hook): args = run_opts(from_ref='', to_ref='', checkout_type='1') environ: MutableMapping[str, str] = {} |