Upgrade add-trailing-comma to 0.4.1

This commit is contained in:
Anthony Sottile 2017-07-15 12:56:51 -07:00
parent ea227f024b
commit e9aea74a77
11 changed files with 94 additions and 63 deletions

View file

@ -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):