summaryrefslogtreecommitdiff
path: root/testsuite/test_api.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2017-11-05 15:46:52 -0800
committerJon Dufresne <jon.dufresne@gmail.com>2019-01-24 18:04:21 -0800
commit68335d1a6d65de7ed09af580bdb909c5f6c139c2 (patch)
treee5759cfc7eb5a1ebe430274d1695d61ab7dfc836 /testsuite/test_api.py
parentdb80d0750951e4a9d1ac82338285496534d6c061 (diff)
downloadpep8-68335d1a6d65de7ed09af580bdb909c5f6c139c2.tar.gz
Add check for over-indented blocks
In a project with all lines indented 4 spaces, I noticed pycodestyle was not catching code that was accidentally indented two levels (8 spaces). The over indentation was unintended and can be caught during static analysis. Fixes #430
Diffstat (limited to 'testsuite/test_api.py')
-rw-r--r--testsuite/test_api.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/test_api.py b/testsuite/test_api.py
index 6342764..ddc28b8 100644
--- a/testsuite/test_api.py
+++ b/testsuite/test_api.py
@@ -125,7 +125,7 @@ class APITestCase(unittest.TestCase):
report = pycodestyle.StyleGuide().check_files([E11])
stdout = sys.stdout.getvalue().splitlines()
self.assertEqual(len(stdout), report.total_errors)
- self.assertEqual(report.total_errors, 17)
+ self.assertEqual(report.total_errors, 20)
self.assertFalse(sys.stderr)
self.reset()
@@ -133,7 +133,7 @@ class APITestCase(unittest.TestCase):
report = pycodestyle.StyleGuide(paths=[E11]).check_files()
stdout = sys.stdout.getvalue().splitlines()
self.assertEqual(len(stdout), report.total_errors)
- self.assertEqual(report.total_errors, 17)
+ self.assertEqual(report.total_errors, 20)
self.assertFalse(sys.stderr)
self.reset()