mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 02:46:52 +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('.')
|
||||
|
||||
|
||||
@mock.patch.object(sys, 'platform', 'win32')
|
||||
def test_windows_detection():
|
||||
@pytest.mark.parametrize('platform,is_windows', [
|
||||
('win32', True),
|
||||
('linux', False),
|
||||
('darwin', False),
|
||||
])
|
||||
def test_windows_detection(platform, is_windows):
|
||||
"""Verify we detect Windows to the best of our knowledge."""
|
||||
finder = config.ConfigFileFinder('flake8', None, [])
|
||||
assert finder.is_windows is True
|
||||
with mock.patch.object(sys, 'platform', platform):
|
||||
finder = config.ConfigFileFinder('flake8', None, [])
|
||||
assert finder.is_windows is is_windows
|
||||
|
||||
|
||||
def test_cli_config():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue