mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-10 14:54:17 +00:00
mypy now passes
This commit is contained in:
parent
b6ba6d4d03
commit
fb7e9338cd
32 changed files with 255 additions and 212 deletions
|
|
@ -44,7 +44,9 @@ def test_format_needs_to_be_implemented():
|
|||
"""Ensure BaseFormatter#format raises a NotImplementedError."""
|
||||
formatter = base.BaseFormatter(options())
|
||||
with pytest.raises(NotImplementedError):
|
||||
formatter.format('foo')
|
||||
formatter.format(
|
||||
style_guide.Violation('A000', 'file.py', 1, 1, 'error text', None)
|
||||
)
|
||||
|
||||
|
||||
def test_show_source_returns_nothing_when_not_showing_source():
|
||||
|
|
@ -73,6 +75,7 @@ def test_show_source_updates_physical_line_appropriately(line, column):
|
|||
formatter = base.BaseFormatter(options(show_source=True))
|
||||
error = style_guide.Violation('A000', 'file.py', 1, column, 'error', line)
|
||||
output = formatter.show_source(error)
|
||||
assert output
|
||||
_, pointer = output.rsplit('\n', 1)
|
||||
assert pointer.count(' ') == (column - 1)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue