mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-07 05:26:53 +00:00
Merge branch 'file_not_found_error' into 'master'
Ensure that a not-found file produces an error Closes #600 See merge request pycqa/flake8!404
This commit is contained in:
commit
abfe59eb3a
3 changed files with 14 additions and 6 deletions
|
|
@ -218,3 +218,12 @@ ignore = F401
|
|||
py_file.write_text(u"import os\n")
|
||||
|
||||
_call_main(["--isolated", "--config", str(config), str(py_file)], retv=1)
|
||||
|
||||
|
||||
def test_file_not_found(tmpdir, capsys):
|
||||
"""Ensure that a not-found file / directory is an error."""
|
||||
with tmpdir.as_cwd():
|
||||
_call_main(["i-do-not-exist"], retv=1)
|
||||
out, err = capsys.readouterr()
|
||||
assert out.startswith("i-do-not-exist:0:1: E902")
|
||||
assert err == ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue