mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-16 02:21:46 +04:00
Add test case
This commit is contained in:
parent
8861b85dae
commit
c6dee597c5
1 changed files with 16 additions and 0 deletions
|
|
@ -473,6 +473,22 @@ def test_hook_verbose_enabled(cap_out, store, repo_with_passing_hook):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def test_hook_prepend_name_enabled(cap_out, store, repo_with_failing_hook):
|
||||||
|
with modify_config() as config:
|
||||||
|
config['repos'][0]['hooks'][0]['always_run'] = True
|
||||||
|
config['repos'][0]['hooks'][0]['prepend_name'] = True
|
||||||
|
|
||||||
|
_test_run(
|
||||||
|
cap_out,
|
||||||
|
store,
|
||||||
|
repo_with_failing_hook,
|
||||||
|
{},
|
||||||
|
(b'Failing hook:',),
|
||||||
|
1,
|
||||||
|
stage=False,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
('from_ref', 'to_ref'), (('master', ''), ('', 'master')),
|
('from_ref', 'to_ref'), (('master', ''), ('', 'master')),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue