summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Stapleton Cordasco <graffatcolmingov@gmail.com>2017-11-26 08:46:49 -0600
committerIan Stapleton Cordasco <graffatcolmingov@gmail.com>2017-11-26 11:25:09 -0600
commitc60546e89668ff542d00230c64f59be2e1b5a3f6 (patch)
tree240ba508a274703467da8776f3e6f886af6d9532 /tests
parenta3a2539a2328487d6544404b4bfab96a205bfef0 (diff)
downloadflake8-c60546e89668ff542d00230c64f59be2e1b5a3f6.tar.gz
Add pep8-naming to flake8 linting
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/test_file_checker.py2
-rw-r--r--tests/unit/test_option.py2
-rw-r--r--tests/unit/test_plugin_type_manager.py18
-rw-r--r--tests/unit/test_trie.py2
4 files changed, 12 insertions, 12 deletions
diff --git a/tests/unit/test_file_checker.py b/tests/unit/test_file_checker.py
index 28264d5..a0918b4 100644
--- a/tests/unit/test_file_checker.py
+++ b/tests/unit/test_file_checker.py
@@ -5,7 +5,7 @@ from flake8 import checker
@mock.patch('flake8.processor.FileProcessor')
-def test_run_ast_checks_handles_SyntaxErrors(FileProcessor):
+def test_run_ast_checks_handles_SyntaxErrors(FileProcessor): # noqa: N802,N803
"""Stress our SyntaxError handling.
Related to: https://gitlab.com/pycqa/flake8/issues/237
diff --git a/tests/unit/test_option.py b/tests/unit/test_option.py
index 67e2255..76b4341 100644
--- a/tests/unit/test_option.py
+++ b/tests/unit/test_option.py
@@ -24,7 +24,7 @@ def test_to_optparse():
@mock.patch('optparse.Option')
-def test_to_optparse_creates_an_option_as_we_expect(Option):
+def test_to_optparse_creates_an_option_as_we_expect(Option): # noqa: N803
"""Show that we pass all keyword args to optparse.Option."""
opt = manager.Option('-t', '--test', action='count')
opt.to_optparse()
diff --git a/tests/unit/test_plugin_type_manager.py b/tests/unit/test_plugin_type_manager.py
index b81a1ae..388cd8d 100644
--- a/tests/unit/test_plugin_type_manager.py
+++ b/tests/unit/test_plugin_type_manager.py
@@ -49,7 +49,7 @@ class FakeTestType(manager.PluginTypeManager):
@mock.patch('flake8.plugins.manager.PluginManager')
-def test_instantiates_a_manager(PluginManager):
+def test_instantiates_a_manager(PluginManager): # noqa: N803
"""Verify we create a PluginManager on instantiation."""
FakeTestType()
@@ -57,7 +57,7 @@ def test_instantiates_a_manager(PluginManager):
@mock.patch('flake8.plugins.manager.PluginManager')
-def test_proxies_names_to_manager(PluginManager):
+def test_proxies_names_to_manager(PluginManager): # noqa: N803
"""Verify we proxy the names attribute."""
PluginManager.return_value = mock.Mock(names=[
'T100', 'T200', 'T300'
@@ -68,7 +68,7 @@ def test_proxies_names_to_manager(PluginManager):
@mock.patch('flake8.plugins.manager.PluginManager')
-def test_proxies_plugins_to_manager(PluginManager):
+def test_proxies_plugins_to_manager(PluginManager): # noqa: N803
"""Verify we proxy the plugins attribute."""
PluginManager.return_value = mock.Mock(plugins=[
'T100', 'T200', 'T300'
@@ -91,7 +91,7 @@ def test_generate_call_function():
@mock.patch('flake8.plugins.manager.PluginManager')
-def test_load_plugins(PluginManager):
+def test_load_plugins(PluginManager): # noqa: N803
"""Verify load plugins loads *every* plugin."""
# Create a bunch of fake plugins
plugins = [create_plugin_mock(), create_plugin_mock(),
@@ -111,7 +111,7 @@ def test_load_plugins(PluginManager):
@mock.patch('flake8.plugins.manager.PluginManager')
-def test_load_plugins_fails(PluginManager):
+def test_load_plugins_fails(PluginManager): # noqa: N803
"""Verify load plugins bubbles up exceptions."""
plugins = [create_plugin_mock(), create_plugin_mock(True),
create_plugin_mock(), create_plugin_mock(),
@@ -135,7 +135,7 @@ def test_load_plugins_fails(PluginManager):
@mock.patch('flake8.plugins.manager.PluginManager')
-def test_register_options(PluginManager):
+def test_register_options(PluginManager): # noqa: N803
"""Test that we map over every plugin to register options."""
plugins = [create_plugin_mock(), create_plugin_mock(),
create_plugin_mock(), create_plugin_mock(),
@@ -153,7 +153,7 @@ def test_register_options(PluginManager):
@mock.patch('flake8.plugins.manager.PluginManager')
-def test_provide_options(PluginManager):
+def test_provide_options(PluginManager): # noqa: N803
"""Test that we map over every plugin to provide parsed options."""
plugins = [create_plugin_mock(), create_plugin_mock(),
create_plugin_mock(), create_plugin_mock(),
@@ -175,7 +175,7 @@ def test_provide_options(PluginManager):
@mock.patch('flake8.plugins.manager.PluginManager')
-def test_proxy_contains_to_managers_plugins_dict(PluginManager):
+def test_proxy_contains_to_managers_plugins_dict(PluginManager): # noqa: N803
"""Verify that we proxy __contains__ to the manager's dictionary."""
plugins = {'T10%i' % i: create_plugin_mock() for i in range(8)}
# Return our PluginManager mock
@@ -188,7 +188,7 @@ def test_proxy_contains_to_managers_plugins_dict(PluginManager):
@mock.patch('flake8.plugins.manager.PluginManager')
-def test_proxies_getitem_to_managers_plugins_dictionary(PluginManager):
+def test_proxies_getitem_to_managers_plugins_dict(PluginManager): # noqa: N803
"""Verify that we can use the PluginTypeManager like a dictionary."""
plugins = {'T10%i' % i: create_plugin_mock() for i in range(8)}
# Return our PluginManager mock
diff --git a/tests/unit/test_trie.py b/tests/unit/test_trie.py
index 152b5b6..2f08a37 100644
--- a/tests/unit/test_trie.py
+++ b/tests/unit/test_trie.py
@@ -83,7 +83,7 @@ class TestTrieNode(object):
assert child.prefix == 'a'
assert child.data == 'a is for Apple'
- def test_find_prefix_returns_None_when_no_children_have_the_prefix(self):
+ def test_find_prefix_returns_none_when_no_children_have_the_prefix(self):
"""Verify we receive None from find_prefix for missing children."""
node = trie.TrieNode('E', 'E is for Eat', children={
'a': trie.TrieNode('a', 'a is for Apple')