mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-07 13:36:54 +00:00
add failing test for missing config file
This commit is contained in:
parent
a7be5e798b
commit
d478d92299
2 changed files with 24 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ import configparser
|
|||
|
||||
import pytest
|
||||
|
||||
from flake8 import exceptions
|
||||
from flake8.main.options import register_default_options
|
||||
from flake8.options import config
|
||||
from flake8.options.manager import OptionManager
|
||||
|
|
@ -164,3 +165,8 @@ def test_parse_config_ignores_unknowns(tmp_path, opt_manager, caplog):
|
|||
'Option "wat" is not registered. Ignoring.',
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
def test_load_config_missing_file_raises_exception(capsys):
|
||||
with pytest.raises(exceptions.ExecutionError):
|
||||
config.load_config("foo.cfg", [])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue