test fail language inline

This commit is contained in:
marsha 2023-02-10 16:18:43 -06:00
parent 4bd1677cda
commit 4fdfb25a52
2 changed files with 14 additions and 24 deletions

View file

@ -0,0 +1,14 @@
from __future__ import annotations
from pre_commit.languages import fail
from testing.language_helpers import run_language
def test_fail_hooks(tmp_path):
ret = run_language(
tmp_path,
fail,
'watch out for',
file_args=('bunnies',),
)
assert ret == (1, b'watch out for\n\nbunnies\n')