diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/W29.py | 14 | ||||
-rw-r--r-- | testsuite/support.py | 5 |
2 files changed, 13 insertions, 6 deletions
diff --git a/testsuite/W29.py b/testsuite/W29.py index 42802ca..688667f 100644 --- a/testsuite/W29.py +++ b/testsuite/W29.py @@ -1,13 +1,17 @@ #: Okay # 情 -#: W291 +#: W291:1:6 print -#: W293 +#: W293:2:1 class Foo(object): bang = 12 -#: W291 +#: W291:2:35 '''multiline string with trailing whitespace''' -#: W292 -# This line doesn't have a linefeed
\ No newline at end of file +#: W292:1:36 noeol +# This line doesn't have a linefeed +#: W292:1:5 E225:1:2 noeol +1+ 1 +#: W292:1:27 E261:1:12 noeol +import this # no line feed diff --git a/testsuite/support.py b/testsuite/support.py index 3c767ed..5185005 100644 --- a/testsuite/support.py +++ b/testsuite/support.py @@ -157,7 +157,10 @@ def init_tests(pep8style): testcase.append(line) continue if codes and index: - codes = [c for c in codes if c != 'Okay'] + if 'noeol' in codes: + testcase[-1] = testcase[-1].rstrip('\n') + codes = [c for c in codes + if c not in ('Okay', 'noeol')] # Run the checker runner(filename, testcase, expected=codes, line_offset=line_offset) |