Commits

Steven Kryskalla committed 7143d00

mccabe warning message was missing a ":" after the column number
update tests to match the new format with the warning code
tests pass in python 2.7 and 3.2

Comments (0)

Files changed (2)

             # ?
             continue
         if graph.complexity() >= min:
-            msg = '%s:%d:1 %s %r is too complex (%d)' % (
+            msg = '%s:%d:1: %s %r is too complex (%d)' % (
                 filename,
                 graph.lineno,
                 WARNING_CODE,

flake8/tests/test_mccabe.py

         self.assertEqual(get_code_complexity(_GLOBAL, 1), 2)
         self.out.seek(0)
         res = self.out.read().strip().split('\n')
-        wanted = ["stdin:5:1: 'a' is too complex (4)",
-                  'stdin:Loop 2 is too complex (2)']
+        wanted = ["stdin:5:1: W901 'a' is too complex (4)",
+                  "stdin:2:1: W901 'Loop 2' is too complex (2)"]
         self.assertEqual(res, wanted)