mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 18:56:53 +00:00
Add test for is_configured_by
This commit is contained in:
parent
d04cb245d3
commit
18bfa1f8a2
1 changed files with 12 additions and 0 deletions
|
|
@ -60,3 +60,15 @@ def test_parse_cli_config(optmanager):
|
|||
os.path.abspath('bogus/'),
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.parametrize('filename,is_configured_by', [
|
||||
('tests/fixtures/config_files/cli-specified.ini', True),
|
||||
('tests/fixtures/config_files/no-flake8-section.ini', False),
|
||||
])
|
||||
def test_is_configured_by(filename, is_configured_by, optmanager):
|
||||
"""Verify the behaviour of the is_configured_by method."""
|
||||
parsed_config, _ = config.ConfigFileFinder._read_config(filename)
|
||||
parser = config.MergedConfigParser(optmanager)
|
||||
|
||||
assert parser.is_configured_by(parsed_config) is is_configured_by
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue