summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsylvain thenault <sylvain.thenault@logilab.fr>2009-03-19 11:00:47 +0100
committersylvain thenault <sylvain.thenault@logilab.fr>2009-03-19 11:00:47 +0100
commita112392fc109cdc17f90ea6c9632f9be04adc929 (patch)
treeaa6fd341ce5eb71ec250ce2892579e76bde7d519
parent448911d71e47300845486a61e4fc1b6a8fc2bd7a (diff)
downloadpylint-a112392fc109cdc17f90ea6c9632f9be04adc929.tar.gz
more format checker test
-rw-r--r--test/input/func_format.py11
-rw-r--r--test/messages/func_format.txt7
2 files changed, 18 insertions, 0 deletions
diff --git a/test/input/func_format.py b/test/input/func_format.py
index 58649e9..f645fba 100644
--- a/test/input/func_format.py
+++ b/test/input/func_format.py
@@ -62,3 +62,14 @@ func('''<body>Hello
assert boo <= 10, "Note is %.2f. Either you cheated, or pylint's \
broken!" % boo
+
+def _gc_debug(gcc):
+ """bad format undetected w/ py2.5"""
+ ocount = {}
+ for obj in gcc.get_objects():
+ try:
+ ocount[obj.__class__]+= 1
+ except KeyError:
+ ocount[obj.__class__]=1
+ except AttributeError:
+ pass
diff --git a/test/messages/func_format.txt b/test/messages/func_format.txt
index c87d01d..f5dc684 100644
--- a/test/messages/func_format.txt
+++ b/test/messages/func_format.txt
@@ -23,3 +23,10 @@ bbbb = (1,2,3)
C: 51:other: Operator not preceded by a space
funky= funky+2
^
+C: 71:_gc_debug: Operator not preceded by a space
+ ocount[obj.__class__]+= 1
+ ^^
+C: 72:_gc_debug: Operator not preceded by a space
+ except KeyError:
+ ocount[obj.__class__]=1
+ ^