mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-15 00:44:44 +00:00
remove --diff option
This commit is contained in:
parent
86268cbde8
commit
fba6df88f9
18 changed files with 11 additions and 526 deletions
|
|
@ -51,22 +51,3 @@ def test_disable_is_inline_ignored():
|
|||
assert error.is_inline_ignored(True) is False
|
||||
|
||||
assert getline.called is False
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"violation_file,violation_line,diff,expected",
|
||||
[
|
||||
("file.py", 10, {}, True),
|
||||
("file.py", 1, {"file.py": range(1, 2)}, True),
|
||||
("file.py", 10, {"file.py": range(1, 2)}, False),
|
||||
("file.py", 1, {"other.py": range(1, 2)}, False),
|
||||
("file.py", 10, {"other.py": range(1, 2)}, False),
|
||||
],
|
||||
)
|
||||
def test_violation_is_in_diff(violation_file, violation_line, diff, expected):
|
||||
"""Verify that we find violations within a diff."""
|
||||
violation = Violation(
|
||||
"E001", violation_file, violation_line, 1, "warning", "line"
|
||||
)
|
||||
|
||||
assert violation.is_in(diff) is expected
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue