mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-13 08:04:18 +00:00
Report error when non-exiting path is passed to flake8
This commit is contained in:
parent
f834499726
commit
59218ca323
3 changed files with 17 additions and 3 deletions
|
|
@ -32,3 +32,14 @@ def test_repr(*args):
|
|||
'example.py', checks={}, options=object(),
|
||||
)
|
||||
assert repr(file_checker) == 'FileChecker for example.py'
|
||||
|
||||
|
||||
def test_nonexistent_file():
|
||||
"""Verify that checking non-existent file results in an error."""
|
||||
c = checker.FileChecker("foobar.py", checks={}, options=object())
|
||||
|
||||
assert c.processor is None
|
||||
assert not c.should_process
|
||||
assert len(c.results) == 1
|
||||
error = c.results[0]
|
||||
assert error[0] == "E902"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue