diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2014-03-25 01:39:06 +0100 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2014-03-25 01:39:06 +0100 |
commit | 2336afaf09875f1501f0fb05dc11c477c5c77bc1 (patch) | |
tree | 41a9a17e0d12b28943573f3ddfb43f74f263248f /testsuite | |
parent | 3d8365a7c8ecd165cef630cc33244e6f3bc9085f (diff) | |
parent | 856d287be3cd8101e8de703b9dd0eef263947e74 (diff) | |
download | pep8-2336afaf09875f1501f0fb05dc11c477c5c77bc1.tar.gz |
Merge, add E265 for space before block comment; issue #190
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/E11.py | 4 | ||||
-rw-r--r-- | testsuite/E26.py | 25 | ||||
-rw-r--r-- | testsuite/test_api.py | 4 | ||||
-rw-r--r-- | testsuite/test_shell.py | 2 |
4 files changed, 31 insertions, 4 deletions
diff --git a/testsuite/E11.py b/testsuite/E11.py index 8735e25..98b9431 100644 --- a/testsuite/E11.py +++ b/testsuite/E11.py @@ -10,3 +10,7 @@ print #: E113 print print +#: E111 E113 +mimetype = 'application/x-directory' + # 'httpd/unix-directory' +create_date = False diff --git a/testsuite/E26.py b/testsuite/E26.py index 984efb5..d838e70 100644 --- a/testsuite/E26.py +++ b/testsuite/E26.py @@ -6,8 +6,31 @@ x = x + 1 #Increment x x = x + 1 # Increment x #: E262 x = y + 1 #: Increment x +#: E265 +#Block comment +a = 1 +#: E265 +m = 42 +#! This is important +mx = 42 - 42 #: Okay +#!/usr/bin/env python + pass # an inline comment x = x + 1 # Increment x y = y + 1 #: Increment x -#: + +# Block comment +a = 1 + +# Block comment1 + +# Block comment2 +aaa = 1 + + +# example of docstring (not parsed) +def oof(): + """ + #foo not parsed + """ diff --git a/testsuite/test_api.py b/testsuite/test_api.py index 313fd93..95f99d9 100644 --- a/testsuite/test_api.py +++ b/testsuite/test_api.py @@ -124,7 +124,7 @@ class APITestCase(unittest.TestCase): report = pep8.StyleGuide().check_files([E11]) stdout = sys.stdout.getvalue().splitlines() self.assertEqual(len(stdout), report.total_errors) - self.assertEqual(report.total_errors, 4) + self.assertEqual(report.total_errors, 6) self.assertFalse(sys.stderr) self.reset() @@ -132,7 +132,7 @@ class APITestCase(unittest.TestCase): report = pep8.StyleGuide(paths=[E11]).check_files() stdout = sys.stdout.getvalue().splitlines() self.assertEqual(len(stdout), report.total_errors) - self.assertEqual(report.total_errors, 4) + self.assertEqual(report.total_errors, 6) self.assertFalse(sys.stderr) self.reset() diff --git a/testsuite/test_shell.py b/testsuite/test_shell.py index 1f12b44..0313c0c 100644 --- a/testsuite/test_shell.py +++ b/testsuite/test_shell.py @@ -75,7 +75,7 @@ class ShellTestCase(unittest.TestCase): stdout = stdout.splitlines() self.assertEqual(errcode, 1) self.assertFalse(stderr) - self.assertEqual(len(stdout), 4) + self.assertEqual(len(stdout), 6) for line, num, col in zip(stdout, (3, 6, 9, 12), (3, 6, 1, 5)): path, x, y, msg = line.split(':') self.assertTrue(path.endswith(E11)) |