diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-06-19 07:03:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-06-19 07:03:44 +0000 |
commit | 9262e31316a16180044e0e28a2740238f8aef5c4 (patch) | |
tree | 49b2bc070018965707ec237623da9932c880fae4 /tests/debug_statement_hook_test.py | |
parent | Adding debian version 4.1.0-1. (diff) | |
download | pre-commit-hooks-9262e31316a16180044e0e28a2740238f8aef5c4.tar.xz pre-commit-hooks-9262e31316a16180044e0e28a2740238f8aef5c4.zip |
Merging upstream version 4.3.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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' |