Index: third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/python_unittest.py |
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/python_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/python_unittest.py |
index 347174556a1bc59502d3a11d86af960306237222..0e272f657b7e148c900dc2656ef4411cd6c1d1f4 100644 |
--- a/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/python_unittest.py |
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/python_unittest.py |
@@ -56,10 +56,18 @@ class PythonCheckerTest(unittest.TestCase): |
file_path = os.path.join(current_dir, "python_unittest_input.py") |
checker = PythonChecker(file_path, _mock_handle_style_error) |
- checker.check(lines=[]) |
+ checker.check() |
- self.assertEqual(errors, [ |
- (4, "pep8/W291", 5, "trailing whitespace"), |
- (4, "pylint/E1601(print-statement)", 5, "[] print statement used"), |
- (4, "pylint/E0602(undefined-variable)", 5, "[] Undefined variable 'error'"), |
- ]) |
+ print errors |
+ |
+ self.assertEqual( |
+ [ |
+ (2, 'pep8/W291', 5, 'trailing whitespace'), |
+ (3, 'pep8/E261', 5, 'at least two spaces before inline comment'), |
+ (3, 'pep8/E262', 5, "inline comment should start with '# '"), |
+ (2, 'pylint/C0303(trailing-whitespace)', 5, '[] Trailing whitespace'), |
qyearsley
2016/05/29 21:00:33
Note that pylint and pep8 both print warnings abou
|
+ (2, 'pylint/E1601(print-statement)', 5, '[] print statement used'), |
+ (2, 'pylint/E0602(undefined-variable)', 5, u"[] Undefined variable 'error'"), |
+ (3, 'pylint/W0611(unused-import)', 5, '[] Unused import math'), |
qyearsley
2016/05/29 21:00:33
After this CL, warnings about unused imports etc.
|
+ ], |
+ errors) |