summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
+ ^