grim/pyscovery

linting

2014-06-24, Gary Kramlich
784bb60cb1d3
Parents 9f6a06864198
Children 020a65b7e258
linting
--- a/tests/pyscovery_test.py Tue Jun 24 10:50:32 2014 -0500
+++ b/tests/pyscovery_test.py Tue Jun 24 10:57:14 2014 -0500
@@ -26,10 +26,7 @@
from tests.modules import create
-# pylint:disable-msg=R0913
-
-
-class Plugin(object): # pylint:disable-msg=R0903
+class Plugin(object):
"""
The class all the test plugins descend from
"""
@@ -66,7 +63,7 @@
test.assertEqual(len(modules), count, 'search paths {}'.format(modules))
-class TestModules(unittest.TestCase): # pylint:disable-msg=R0904
+class TestModules(unittest.TestCase):
"""
Unit tests for path manipulation
"""
@@ -74,11 +71,11 @@
module = 'test'
- def setUp(self): # pylint:disable-msg=C0103
+ def setUp(self):
pyscovery.clear_modules()
- def tearDown(self): # pylint:disable-msg=C0103
+ def tearDown(self):
_test_module_count(self, 0)
pyscovery.clear_modules()
@@ -105,7 +102,7 @@
pyscovery.remove_module(TestModules.module)
- def test_remove_nonexistant(self): # pylint:disable-msg=R0201
+ def test_remove_nonexistant(self):
"""
Try to remove a non-existant plugin path
"""
@@ -130,7 +127,7 @@
pyscovery.remove_module(second)
-class TestFind(unittest.TestCase): # pylint:disable-msg=R0904
+class TestFind(unittest.TestCase):
"""
Basic tests for the find function
"""
@@ -159,13 +156,13 @@
self.assertRaises(TypeError, pyscovery.find(0, False, False))
- def test_old_style_class(self): # pylint:disable-msg=R0201
+ def test_old_style_class(self):
"""
Test that a TypeError is NOT raised when find is called with an old
style class
"""
- class Test: # pylint:disable-msg=R0903,W0232
+ class Test:
""" old style class """
pass
@@ -173,13 +170,13 @@
pyscovery.find(Test, False, False)
- def test_new_style_class(self): # pylint:disable-msg=R0201
+ def test_new_style_class(self):
"""
Test that a TypeError is NOT raised when find is called with an new
style class
"""
- class Test(object): # pylint:disable-msg=R0903
+ class Test(object):
""" new style class """
pass
@@ -187,15 +184,15 @@
pyscovery.find(Test, False, False)
-class TestModule(unittest.TestCase): # pylint:disable-msg=R0904
+class TestModule(unittest.TestCase):
""" Tests the discovery method of pyscovery """
- def setUp(self): # pylint:disable-msg=C0103
+ def setUp(self):
pyscovery.clear_modules()
- def tearDown(self): # pylint:disable-msg=C0103
+ def tearDown(self):
pyscovery.clear_modules()
@@ -214,15 +211,15 @@
_test_module(self, 'tests.modules.mixed', 2)
-class TestPackage(unittest.TestCase): # pylint:disable-msg=R0904
+class TestPackage(unittest.TestCase):
""" Tests the find method of pyscovery on a package """
- def setUp(self): # pylint:disable-msg=C0103
+ def setUp(self):
pyscovery.clear_modules()
- def tearDown(self): # pylint:disable-msg=C0103
+ def tearDown(self):
pyscovery.clear_modules()
@@ -241,10 +238,10 @@
_test_module(self, 'tests.modules', 7, recurse=True)
-class TestCreate(unittest.TestCase): # pylint:disable-msg=R0904
+class TestCreate(unittest.TestCase):
""" Tests the find method with the create option on """
- def setUp(self): # pylint:disable-msg=C0103
+ def setUp(self):
pyscovery.clear_modules()
@@ -264,10 +261,10 @@
_test_module(self, 'tests.modules', 7, recurse=True, instantiate=True)
-class TestCreateWithParameters(unittest.TestCase): # pylint:disable-msg=R0904
+class TestCreateWithParameters(unittest.TestCase):
""" Tests for finding and creating plugins that take arguments """
- def setUp(self): # pylint:disable-msg=C0103
+ def setUp(self):
pyscovery.clear_modules()
pyscovery.add_module('tests.modules.create')