mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 11:36:54 +00:00
Upgrade add-trailing-comma to 0.4.1
This commit is contained in:
parent
ea227f024b
commit
e9aea74a77
11 changed files with 94 additions and 63 deletions
|
|
@ -10,30 +10,36 @@ from testing.util import get_resource_path
|
|||
|
||||
@pytest.fixture
|
||||
def ast_with_no_debug_imports():
|
||||
return ast.parse("""
|
||||
return ast.parse(
|
||||
"""
|
||||
import foo
|
||||
import bar
|
||||
import baz
|
||||
from foo import bar
|
||||
""")
|
||||
""",
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def ast_with_debug_import_form_1():
|
||||
return ast.parse("""
|
||||
return ast.parse(
|
||||
"""
|
||||
|
||||
import ipdb; ipdb.set_trace()
|
||||
|
||||
""")
|
||||
""",
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def ast_with_debug_import_form_2():
|
||||
return ast.parse("""
|
||||
return ast.parse(
|
||||
"""
|
||||
|
||||
from pudb import set_trace; set_trace()
|
||||
|
||||
""")
|
||||
""",
|
||||
)
|
||||
|
||||
|
||||
def test_returns_no_debug_statements(ast_with_no_debug_imports):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue