mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-09 14:24:17 +00:00
Parametrize windows detection unit test
This commit is contained in:
parent
949d3e48fe
commit
cb276d63e3
1 changed files with 9 additions and 4 deletions
|
|
@ -14,11 +14,16 @@ def test_uses_default_args():
|
||||||
assert finder.parent == os.path.abspath('.')
|
assert finder.parent == os.path.abspath('.')
|
||||||
|
|
||||||
|
|
||||||
@mock.patch.object(sys, 'platform', 'win32')
|
@pytest.mark.parametrize('platform,is_windows', [
|
||||||
def test_windows_detection():
|
('win32', True),
|
||||||
|
('linux', False),
|
||||||
|
('darwin', False),
|
||||||
|
])
|
||||||
|
def test_windows_detection(platform, is_windows):
|
||||||
"""Verify we detect Windows to the best of our knowledge."""
|
"""Verify we detect Windows to the best of our knowledge."""
|
||||||
|
with mock.patch.object(sys, 'platform', platform):
|
||||||
finder = config.ConfigFileFinder('flake8', None, [])
|
finder = config.ConfigFileFinder('flake8', None, [])
|
||||||
assert finder.is_windows is True
|
assert finder.is_windows is is_windows
|
||||||
|
|
||||||
|
|
||||||
def test_cli_config():
|
def test_cli_config():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue