mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-12 15:44:17 +00:00
Fix up test files for W504
This commit is contained in:
parent
c58a4662d8
commit
56b86ba9fe
3 changed files with 15 additions and 15 deletions
|
|
@ -70,8 +70,8 @@ def test_generate_possible_local_files(args, expected):
|
||||||
"""Verify generation of all possible config paths."""
|
"""Verify generation of all possible config paths."""
|
||||||
finder = config.ConfigFileFinder('flake8', args, [])
|
finder = config.ConfigFileFinder('flake8', args, [])
|
||||||
|
|
||||||
assert (list(finder.generate_possible_local_files()) ==
|
assert (list(finder.generate_possible_local_files())
|
||||||
expected)
|
== expected)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('args,extra_config_files,expected', [
|
@pytest.mark.parametrize('args,extra_config_files,expected', [
|
||||||
|
|
|
||||||
|
|
@ -50,5 +50,5 @@ class TestNotifier(object):
|
||||||
])
|
])
|
||||||
def test_listeners_for(self, code, expected):
|
def test_listeners_for(self, code, expected):
|
||||||
"""Verify that we retrieve the correct listeners."""
|
"""Verify that we retrieve the correct listeners."""
|
||||||
assert ([l.error_code for l in self.notifier.listeners_for(code)] ==
|
assert ([l.error_code
|
||||||
expected)
|
for l in self.notifier.listeners_for(code)] == expected)
|
||||||
|
|
|
||||||
|
|
@ -135,8 +135,8 @@ def test_generate_versions(optmanager):
|
||||||
manager.PluginVersion('Testing 101', '0.0.0', False),
|
manager.PluginVersion('Testing 101', '0.0.0', False),
|
||||||
manager.PluginVersion('Testing 300', '0.0.0', True),
|
manager.PluginVersion('Testing 300', '0.0.0', True),
|
||||||
]
|
]
|
||||||
assert (optmanager.generate_versions() ==
|
assert (optmanager.generate_versions()
|
||||||
'Testing 100: 0.0.0, Testing 101: 0.0.0, Testing 300: 0.0.0')
|
== 'Testing 100: 0.0.0, Testing 101: 0.0.0, Testing 300: 0.0.0')
|
||||||
|
|
||||||
|
|
||||||
def test_plugins_are_sorted_in_generate_versions(optmanager):
|
def test_plugins_are_sorted_in_generate_versions(optmanager):
|
||||||
|
|
@ -148,12 +148,12 @@ def test_plugins_are_sorted_in_generate_versions(optmanager):
|
||||||
manager.PluginVersion('flake8-docstrings', '0.6.1', False),
|
manager.PluginVersion('flake8-docstrings', '0.6.1', False),
|
||||||
manager.PluginVersion('flake8-bugbear', '2016.12.1', False),
|
manager.PluginVersion('flake8-bugbear', '2016.12.1', False),
|
||||||
]
|
]
|
||||||
assert (optmanager.generate_versions() ==
|
assert (optmanager.generate_versions()
|
||||||
'flake8-bugbear: 2016.12.1, '
|
== 'flake8-bugbear: 2016.12.1, '
|
||||||
'flake8-docstrings: 0.6.1, '
|
'flake8-docstrings: 0.6.1, '
|
||||||
'mccabe: 0.7.0, '
|
'mccabe: 0.7.0, '
|
||||||
'pycodestyle: 2.2.0, '
|
'pycodestyle: 2.2.0, '
|
||||||
'pyflakes: 1.5.0')
|
'pyflakes: 1.5.0')
|
||||||
|
|
||||||
|
|
||||||
def test_generate_versions_with_format_string(optmanager):
|
def test_generate_versions_with_format_string(optmanager):
|
||||||
|
|
@ -182,9 +182,9 @@ def test_update_version_string(optmanager):
|
||||||
optmanager.update_version_string()
|
optmanager.update_version_string()
|
||||||
|
|
||||||
assert optmanager.version == TEST_VERSION
|
assert optmanager.version == TEST_VERSION
|
||||||
assert (optmanager.parser.version == TEST_VERSION + ' ('
|
assert (optmanager.parser.version == TEST_VERSION
|
||||||
'Testing 100: 0.0.0, Testing 101: 0.0.0, Testing 300: 0.0.0) ' +
|
+ ' (Testing 100: 0.0.0, Testing 101: 0.0.0, Testing 300: 0.0.0) '
|
||||||
utils.get_python_version())
|
+ utils.get_python_version())
|
||||||
|
|
||||||
|
|
||||||
def test_generate_epilog(optmanager):
|
def test_generate_epilog(optmanager):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue