2012-12-06 17:44:37 +00:00
|
|
|
# pylint: disable=E1101
|
|
|
|
# pylint: disable=C0103
|
|
|
|
# pylint: disable=R0903
|
|
|
|
"""test bugfix for #113231 in logging checker
|
|
|
|
"""
|
2014-10-24 14:20:56 +00:00
|
|
|
from __future__ import absolute_import
|
2012-12-06 17:44:37 +00:00
|
|
|
# Muck up the names in an effort to confuse...
|
|
|
|
import logging as renamed_logging
|
|
|
|
|
2015-11-10 12:36:56 +00:00
|
|
|
__revision__ = ''
|
|
|
|
|
2012-12-06 17:44:37 +00:00
|
|
|
class Logger(object):
|
|
|
|
"""Fake logger"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
logger = renamed_logging.getLogger(__name__)
|
|
|
|
fake_logger = Logger()
|
|
|
|
|
|
|
|
# Statements that should be flagged:
|
2015-09-21 00:11:44 +00:00
|
|
|
renamed_logging.warning('%s, %s' % (4, 5))
|
|
|
|
logger.warning('%s' % 5)
|
2012-12-06 17:44:37 +00:00
|
|
|
|
|
|
|
# Statements that should not be flagged:
|
|
|
|
fake_logger.warn('%s' % 5)
|