Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Teach pylint about unittest's setUp and tearDown names.

This avoids needing to block out that warning once per TestCase
subclass.
  • Loading branch information...
commit 5e7117c1391ce2d955d80e4287c644d25a52d27d 1 parent d716b06
@malcolmt authored
View
3  acacia/tests/test_models.py
@@ -17,7 +17,7 @@ def setUp(self):
similar, but different paths and that some nodes appear multiple times
(and node "d" only appears once).
"""
- # pylint: disable-msg=C0103,R0201
+ # pylint: disable-msg=R0201
nodes = ["a/b/c",
"a/x/c",
"c/b/d",
@@ -35,7 +35,6 @@ def setUp(self):
self.signals = []
def tearDown(self):
- # pylint: disable-msg=C0103
self.signals = []
def signal_catcher(self, sender, **kwargs):
View
2  acacia/tests/test_templatetags.py
@@ -74,7 +74,6 @@ def test_html_sensitive_content(self):
class TreeTrunkSingleRootTests(test.TestCase):
def setUp(self):
- # pylint: disable-msg=C0103
nodes = [
"root1/child1/grandchild1",
"root1/child1/grandchild2",
@@ -163,7 +162,6 @@ def test_default_level(self):
class TreeTrunkFullContentTests(test.TestCase):
def setUp(self):
- # pylint: disable-msg=C0103
nodes = [
"root1/child1/grandchild1",
"root1/child1/grandchild2",
View
2  pylint.rc
@@ -141,7 +141,7 @@ class-rgx=[A-Z_][a-zA-Z0-9]+$
function-rgx=[a-z_][a-z0-9_]{2,30}$
# Regular expression which should only match correct method names
-method-rgx=[a-z_][a-z0-9_]{2,30}$
+method-rgx=[a-z_][a-z0-9_]{2,30}$|setUp$|tearDown$
# Regular expression which should only match correct instance attribute names
attr-rgx=[a-z_][a-z0-9_]{2,30}$
Please sign in to comment.
Something went wrong with that request. Please try again.