mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-08 22:04:17 +00:00
extend black formatting to tests as well
This commit is contained in:
parent
a7174759e9
commit
af1668bf04
45 changed files with 1644 additions and 1307 deletions
|
|
@ -18,14 +18,14 @@ def test_all_pyflakes_messages_have_flake8_codes_assigned():
|
|||
|
||||
def test_undefined_local_code():
|
||||
"""In pyflakes 2.1.0 this code's string formatting was changed."""
|
||||
src = '''\
|
||||
src = """\
|
||||
import sys
|
||||
|
||||
def f():
|
||||
sys = sys
|
||||
'''
|
||||
"""
|
||||
tree = ast.parse(src)
|
||||
checker = pyflakes_shim.FlakesChecker(tree, (), 't.py')
|
||||
checker = pyflakes_shim.FlakesChecker(tree, (), "t.py")
|
||||
message_texts = [s for _, _, s, _ in checker.run()]
|
||||
assert message_texts == [
|
||||
"F823 local variable 'sys' defined in enclosing scope on line 1 referenced before assignment", # noqa: E501
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue