Permalink
Browse files

Minor pylinted updates

  • Loading branch information...
1 parent 471bbcd commit 5ca94dea02367993db2a20e530ba5f3e73858f1b @BasicWolf committed Dec 17, 2012
Showing with 16 additions and 11 deletions.
  1. +2 −1 .pylintrc
  2. +6 −5 kaylee/testsuite/loader_tests.py
  3. +8 −4 kaylee/testsuite/project_tests.py
  4. +0 −1 kaylee/testsuite/session_tests.py
View
@@ -33,11 +33,12 @@ load-plugins=
# can either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once).
-disable=I0011,C0111,C0103,R0903,W0142
+disable=I0011,C0111,C0103,R0903,W0142,R0904
# C0111: Missing docstring
# C0103: Invalid name XXX (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
# R0903: Too few public methods
# W0142: Used * or ** magic
+# R0904: Too many public methods
# C0103,W0212,R0903,R0914,W0142,W0212,W0603,W0402
@@ -1,6 +1,6 @@
-#
-# Comments to dict(Class.__dict__) wrapping: __dict__ is a dictproxy,
-#
+#pylint: disable-msg=W0212
+#W0212: Access to a protected member
+###
from kaylee.testsuite import KayleeTest, load_tests, PROJECTS_DIR
@@ -62,13 +62,14 @@ def test_load_config_class(self):
TestConfig.WORKER_SCRIPT_URL)
def test_load_config_dict(self):
+ # dict(Class.__dict__) wrapping: __dict__ is a dictproxy,
kl = loader.load(dict(TestConfig.__dict__))
self.assertIsInstance(kl, Kaylee)
self.assertEqual(kl._config.WORKER_SCRIPT_URL,
TestConfig.WORKER_SCRIPT_URL)
def test_load_config_module(self):
- import test_config
+ from . import test_config
kl = loader.load(test_config)
self.assertIsInstance(kl, Kaylee)
self.assertEqual(kl._config.WORKER_SCRIPT_URL,
@@ -78,7 +79,7 @@ def test_load_config_path(self):
path = os.path.abspath(os.path.join(os.path.dirname(__file__),
'test_config.py'))
kl = loader.load(path)
- import test_config
+ from . import test_config
self.assertIsInstance(kl, Kaylee)
self.assertEqual(kl._config.WORKER_SCRIPT_URL,
test_config.WORKER_SCRIPT_URL)
@@ -1,4 +1,3 @@
-import unittest
from kaylee.testsuite import KayleeTest, load_tests
from kaylee.project import Project, AUTO_PROJECT_MODE, MANUAL_PROJECT_MODE
@@ -22,13 +21,18 @@ def __init__(self):
Project.__init__(self, "/script.js")
self.assertRaises(ValueError, MyProjectInvalidMode)
- # -- test with valid mode
- class MyProjectWithMode(Project):
+ # -- test with valid modes
+ class MyProjectWithAutoMode(Project):
mode = AUTO_PROJECT_MODE
def __init__(self):
Project.__init__(self, "/script.js")
+ MyProjectWithAutoMode()
- p = MyProjectWithMode()
+ class MyProjectWithManualMode(Project):
+ mode = MANUAL_PROJECT_MODE
+ def __init__(self):
+ Project.__init__(self, "/script.js")
+ MyProjectWithManualMode()
@@ -1,4 +1,3 @@
-import string
from copy import deepcopy
from kaylee.testsuite import KayleeTest, load_tests
from kaylee.node import Node, NodeID

0 comments on commit 5ca94de

Please sign in to comment.