summaryrefslogtreecommitdiffstats
path: root/tests/languages/fail_test.py
blob: 7c74886fd7e5f1ebd6d99804c7909454c63909dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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')