Commits

Sylvain Thénault committed 34f18e2

missing test data files

Comments (0)

Files changed (2)

test/input/func_e65xx.py

+# pylint: disable=E1101
+"""Test checking of log format strings
+"""
+
+__revision__ = ''
+
+import logging
+
+def pprint():
+    """Test string format in logging statements.
+    """
+    # These should all emit lint errors:
+    logging.info(0, '') # 6505
+    logging.info('', '') # 6505
+    logging.info('%s%', '') # 6501
+    logging.info('%s%s', '') # 6506
+    logging.info('%s%a', '', '') # 6500
+    logging.info('%s%s', '', '', '') # 6505
+
+    # These should be okay:
+    logging.info(1)
+    logging.info(True)
+    logging.info('')
+    logging.info('%s%')
+    logging.info('%s', '')
+    logging.info('%s%%', '')
+    logging.info('%s%s', '', '')

test/messages/func_e65xx.txt

+E: 13:pprint: Too many arguments for logging format string
+E: 14:pprint: Too many arguments for logging format string
+E: 15:pprint: Logging format string ends in middle of conversion specifier
+E: 16:pprint: Not enough arguments for logging format string
+E: 17:pprint: Unsupported logging format character 'a' (0x61) at index 3
+E: 18:pprint: Too many arguments for logging format string