summaryrefslogtreecommitdiff
path: root/test/test_logging.py
diff options
context:
space:
mode:
authorTorsten Marek <shlomme@gmail.com>2014-03-30 14:19:33 -0700
committerTorsten Marek <shlomme@gmail.com>2014-03-30 14:19:33 -0700
commit66a922f1b008ef9bb8e574ae5430584caaaa43c6 (patch)
tree59e81d5ca3699c8a5e400b7c0f7e4b501a345445 /test/test_logging.py
parentb332c37c1fd90e54fcdeb716676950884d443661 (diff)
downloadpylint-66a922f1b008ef9bb8e574ae5430584caaaa43c6.tar.gz
Add a new decorator that can be used to declaratively set options on the checker instance for CheckerTestCase.
Diffstat (limited to 'test/test_logging.py')
-rw-r--r--test/test_logging.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/test_logging.py b/test/test_logging.py
index 85d3c82..fe7e638 100644
--- a/test/test_logging.py
+++ b/test/test_logging.py
@@ -7,7 +7,7 @@ from astroid import test_utils
from pylint.checkers import logging
-from pylint.testutils import CheckerTestCase, Message
+from pylint.testutils import CheckerTestCase, Message, set_config
class LoggingModuleDetectionTest(CheckerTestCase):
@@ -33,9 +33,8 @@ class LoggingModuleDetectionTest(CheckerTestCase):
with self.assertAddsMessages(Message('W1201', node=stmts[1])):
self.checker.visit_callfunc(stmts[1])
+ @set_config(logging_modules=['logging', 'my.logging'])
def test_nonstandard_logging_module(self):
- self.checker.config.logging_modules = (
- 'logging', 'my.logging')
stmts = test_utils.extract_node("""
from my import logging as blogging #@
blogging.warn('%s' % '%s') #@