1
# pylint: disable=E1101
2
"""test checking use of the logging module
7
# Muck up the names in an effort to confuse...
8
import logging as renamed_logging
11
# Statements that should be flagged:
12
renamed_logging.warn('%s, %s' % (4, 5))
13
renamed_logging.exception('%s' % 'Exceptional!')
14
renamed_logging.log(renamed_logging.INFO, 'msg: %s' % 'Run!')
16
# Statements that should not be flagged:
17
renamed_logging.warn('%s, %s', 4, 5)
18
renamed_logging.log(renamed_logging.INFO, 'msg: %s', 'Run!')
19
renamed_logging.warn('%s' + ' the rest of a single string')
20
logging.warn('%s, %s' % (4, 5))
21
logging.log(logging.INFO, 'msg: %s' % 'Run!')