summaryrefslogtreecommitdiff
path: root/test/input/func_w6501.py
blob: 9013c2db3d7940e84256c4ff0b8656bc38986c5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# pylint: disable=E1101
"""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!')