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

« back to all changes in this revision

Viewing changes to test/input/func_w1201.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 use of the logging module
 
3
"""
 
4
 
 
5
__revision__ = ''
 
6
 
 
7
# Muck up the names in an effort to confuse...
 
8
import logging as renamed_logging
 
9
import os as logging
 
10
 
 
11
# Statements that should be flagged:
 
12
renamed_logging.warn('%s, %s' % (4, 5))
 
13
renamed_logging.exception('%s' % 'Exceptional!')
 
14
renamed_logging.log(renamed_logging.INFO, 'msg: %s' % 'Run!')
 
15
 
 
16
# Statements that should not be flagged:
 
17
renamed_logging.warn('%s, %s', 4, 5)
 
18
renamed_logging.log(renamed_logging.INFO, 'msg: %s', 'Run!')
 
19
renamed_logging.warn('%s' + ' the rest of a single string')
 
20
logging.warn('%s, %s' % (4, 5))
 
21
logging.log(logging.INFO, 'msg: %s' % 'Run!')