diff options
author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2011-07-08 10:22:28 +0200 |
---|---|---|
committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2011-07-08 10:22:28 +0200 |
commit | 9894a90d4389a80e2a2921298f972e42303b642c (patch) | |
tree | 3428b4ff15baf5f19c17f3b10700c6981acac57b | |
parent | 1fa5b2d8202ce2cf899016d37992aba61ee28df7 (diff) | |
download | pylint-git-9894a90d4389a80e2a2921298f972e42303b642c.tar.gz |
missing test data files
-rw-r--r-- | test/input/func_e65xx.py | 27 | ||||
-rw-r--r-- | test/messages/func_e65xx.txt | 6 |
2 files changed, 33 insertions, 0 deletions
diff --git a/test/input/func_e65xx.py b/test/input/func_e65xx.py new file mode 100644 index 000000000..854c34796 --- /dev/null +++ b/test/input/func_e65xx.py @@ -0,0 +1,27 @@ +# 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', '', '') diff --git a/test/messages/func_e65xx.txt b/test/messages/func_e65xx.txt new file mode 100644 index 000000000..690e6f405 --- /dev/null +++ b/test/messages/func_e65xx.txt @@ -0,0 +1,6 @@ +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 |