Skip to content

Commit 6fa11a1

Browse files
committed
Add some test cases for multiline strings.
Since I'm about to add special treatment of multiline strings, I thought it best to ensure that we preserve the existing behaviour.
1 parent 8d65869 commit 6fa11a1

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

testsuite/E50.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,11 @@
4545
('''
4646
''' + ' \
4747
')
48+
#
49+
#: E501
50+
'''multiline string
51+
with a long long long long long long long long long long long long long long long long line
52+
'''
53+
#: E501
54+
'''same thing, but this time without a terminal newline in the string
55+
long long long long long long long long long long long long long long long long line'''

testsuite/W19.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ def long_function_name(
9797
if os.path.exists(os.path.join(path, PEP8_BIN)):
9898
cmd = ([os.path.join(path, PEP8_BIN)] +
9999
self._pep8_options(targetfile))
100+
#: W191
101+
'''
102+
multiline string with tab in it'''
103+
#: E101 W191
104+
'''multiline string
105+
with tabs
106+
and spaces
107+
'''
100108
#: E101 W191
101109
if foo is None and bar is "frop" and \
102110
blah == 'yeah':

testsuite/W29.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@
66
class Foo(object):
77

88
bang = 12
9+
#: W291
10+
'''multiline
11+
string with trailing whitespace'''
912
#: W292
1013
# This line doesn't have a linefeed

0 commit comments

Comments
 (0)