summaryrefslogtreecommitdiff
path: root/tests/input/func_bug113231.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/input/func_bug113231.py')
-rw-r--r--tests/input/func_bug113231.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/input/func_bug113231.py b/tests/input/func_bug113231.py
new file mode 100644
index 000000000..6334ff9c8
--- /dev/null
+++ b/tests/input/func_bug113231.py
@@ -0,0 +1,24 @@
+# pylint: disable=E1101
+# pylint: disable=C0103
+# pylint: disable=R0903, useless-object-inheritance, unnecessary-pass
+"""test bugfix for #113231 in logging checker
+"""
+from __future__ import absolute_import
+# Muck up the names in an effort to confuse...
+import logging as renamed_logging
+
+__revision__ = ''
+
+class Logger(object):
+ """Fake logger"""
+ pass
+
+logger = renamed_logging.getLogger(__name__)
+fake_logger = Logger()
+
+# Statements that should be flagged:
+renamed_logging.warning('%s, %s' % (4, 5))
+logger.warning('%s' % 5)
+
+# Statements that should not be flagged:
+fake_logger.warn('%s' % 5)