~ubuntu-branches/ubuntu/vivid/pylint/vivid-proposed

« back to all changes in this revision

Viewing changes to test/input/func_e99xx.py

  • Committer: Bazaar Package Importer
  • Author(s): Sandro Tosi
  • Date: 2009-12-19 21:38:49 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20091219213849-kcax3214c3mmucox
Tags: 0.19.0-1
* New upstream release
* debian/pylint.docs
  - removed 'TODO', no more shipped
* debian/copyright
  - updated copyright information, also adding new files with different info
* debian/{rules, TODO}
  - run tests at build-time
* debian/pylint.postrm
  - use 'set -e' instead of calling shell with '-e'

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"""test string format error
 
2
"""
 
3
 
 
4
__revision__ = 1
 
5
 
 
6
PARG_1 = PARG_2 = PARG_3 = 1
 
7
 
 
8
def pprint():
 
9
    """Test string format
 
10
    """
 
11
    print "%s %s" % {'PARG_1': 1, 'PARG_2': 2} # E9906
 
12
    print "%s" % (PARG_1, PARG_2) # E9905
 
13
    print "%(PARG_1)d %d" % {'PARG_1': 1, 'PARG_2': 2} # E9902
 
14
    print "%(PARG_1)d %(PARG_2)d" % {'PARG_1': 1} # E9904
 
15
    print "%(PARG_1)d %(PARG_2)d" % {'PARG_1': 1, 'PARG_2':2, 'PARG_3':3} # W9901
 
16
    print "%(PARG_1)d %(PARG_2)d" % {'PARG_1': 1, 2:3} # W9900 E9904
 
17
    print "%(PARG_1)d %(PARG_2)d" % (2, 3) # 9903
 
18
    print "%(PARG_1)d %(PARG_2)d" % [2, 3] # 9903
 
19
    print "%2z" % PARG_1
 
20
    print "strange format %2" % PARG_2
 
21