mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-01 10:56:52 +00:00
check for print debug statement
This commit is contained in:
parent
f4e025486b
commit
7c3f665ba8
2 changed files with 12 additions and 1 deletions
|
|
@ -30,6 +30,12 @@ def test_finds_breakpoint():
|
|||
visitor = DebugStatementParser()
|
||||
visitor.visit(ast.parse('breakpoint()'))
|
||||
assert visitor.breakpoints == [Debug(1, 0, 'breakpoint', 'called')]
|
||||
|
||||
|
||||
def test_finds_print():
|
||||
visitor = DebugStatementParser()
|
||||
visitor.visit(ast.parse('print()'))
|
||||
assert visitor.breakpoints == [Debug(1, 0, 'print', 'called')]
|
||||
|
||||
|
||||
def test_returns_one_for_failing_file(tmpdir):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue