diff options
Diffstat (limited to 'pylint/test/input/func_w1201.py')
-rw-r--r-- | pylint/test/input/func_w1201.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pylint/test/input/func_w1201.py b/pylint/test/input/func_w1201.py new file mode 100644 index 0000000..a9791d9 --- /dev/null +++ b/pylint/test/input/func_w1201.py @@ -0,0 +1,21 @@ +# pylint: disable=E1101, no-absolute-import +"""test checking use of the logging module +""" + +__revision__ = '' + +# Muck up the names in an effort to confuse... +import logging as renamed_logging +import os as logging + +# Statements that should be flagged: +renamed_logging.warn('%s, %s' % (4, 5)) +renamed_logging.exception('%s' % 'Exceptional!') +renamed_logging.log(renamed_logging.INFO, 'msg: %s' % 'Run!') + +# Statements that should not be flagged: +renamed_logging.warn('%s, %s', 4, 5) +renamed_logging.log(renamed_logging.INFO, 'msg: %s', 'Run!') +renamed_logging.warn('%s' + ' the rest of a single string') +logging.warn('%s, %s' % (4, 5)) +logging.log(logging.INFO, 'msg: %s' % 'Run!') |