~ubuntu-branches/ubuntu/quantal/pylint/quantal

« back to all changes in this revision

Viewing changes to test/input/func_e12xx.py

  • Committer: Bazaar Package Importer
  • Author(s): Sandro Tosi
  • Date: 2011-08-02 20:05:50 UTC
  • mfrom: (7.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110802200550-5efk0cfszfzjpjdn
Tags: 0.24.0-1
* New upstream release
* debian/copyright
  - bump upstream and packaging copyright years
* debian/rules
  - add build-arch build-indep targets, as suggested by lintian
* debian/control
  - bump Standards-Version to 3.9.2 (no changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# pylint: disable=E1101
 
2
"""Test checking of log format strings
 
3
"""
 
4
 
 
5
__revision__ = ''
 
6
 
 
7
import logging
 
8
 
 
9
def pprint():
 
10
    """Test string format in logging statements.
 
11
    """
 
12
    # These should all emit lint errors:
 
13
    logging.info(0, '') # 1205
 
14
    logging.info('', '') # 1205
 
15
    logging.info('%s%', '') # 1201
 
16
    logging.info('%s%s', '') # 1206
 
17
    logging.info('%s%a', '', '') # 1200
 
18
    logging.info('%s%s', '', '', '') # 1205
 
19
 
 
20
    # These should be okay:
 
21
    logging.info(1)
 
22
    logging.info(True)
 
23
    logging.info('')
 
24
    logging.info('%s%')
 
25
    logging.info('%s', '')
 
26
    logging.info('%s%%', '')
 
27
    logging.info('%s%s', '', '')