diff options
Diffstat (limited to 'tests/debug_statement_hook_test.py')
-rw-r--r-- | tests/debug_statement_hook_test.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/debug_statement_hook_test.py b/tests/debug_statement_hook_test.py index 428421a..5a8e0bb 100644 --- a/tests/debug_statement_hook_test.py +++ b/tests/debug_statement_hook_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import ast from pre_commit_hooks.debug_statement_hook import Debug @@ -53,7 +55,9 @@ def test_non_utf8_file(tmpdir): assert main((str(f_py),)) == 0 -def test_py37_breakpoint(tmpdir): +def test_py37_breakpoint(tmpdir, capsys): f_py = tmpdir.join('f.py') f_py.write('def f():\n breakpoint()\n') assert main((str(f_py),)) == 1 + out, _ = capsys.readouterr() + assert out == f'{f_py}:2:4: breakpoint called\n' |