summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2014-03-23 02:45:41 +0100
committerFlorent Xicluna <florent.xicluna@gmail.com>2014-03-23 02:45:41 +0100
commit61a1f6ddc749ff0e909532f7044c25debe62c404 (patch)
tree048b85a47ad1e201436ec759563036842afc95eb /testsuite
parentdd06247127fd415c424177a35ec89b46423b460f (diff)
parent9ab266d03d82d9d3bf5536a303624999a1ed89bc (diff)
downloadpep8-61a1f6ddc749ff0e909532f7044c25debe62c404.tar.gz
Merge branch 'master' of https://github.com/gward/pep8 into gward-master
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/E50.py23
-rw-r--r--testsuite/W19.py22
-rw-r--r--testsuite/W29.py3
-rw-r--r--testsuite/W39no.py6
4 files changed, 54 insertions, 0 deletions
diff --git a/testsuite/E50.py b/testsuite/E50.py
index 4cc4383..6d62b38 100644
--- a/testsuite/E50.py
+++ b/testsuite/E50.py
@@ -45,3 +45,26 @@ ddd = \
('''
''' + ' \
')
+#: E501 E225 E226
+very_long_identifiers=and_terrible_whitespace_habits(are_no_excuse+for_long_lines)
+#
+#: E501
+'''multiline string
+with a long long long long long long long long long long long long long long long long line
+'''
+#: E501
+'''same thing, but this time without a terminal newline in the string
+long long long long long long long long long long long long long long long long line'''
+#
+# issue 224 (unavoidable long lines in docstrings)
+#: Okay
+"""
+I'm some great documentation. Because I'm some great documentation, I'm
+going to give you a reference to some valuable information about some API
+that I'm calling:
+
+ http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx
+"""
+#: E501
+"""
+longnospaceslongnospaceslongnospaceslongnospaceslongnospaceslongnospaceslongnospaceslongnospaces"""
diff --git a/testsuite/W19.py b/testsuite/W19.py
index c81f46f..2209e38 100644
--- a/testsuite/W19.py
+++ b/testsuite/W19.py
@@ -97,6 +97,28 @@ if length > options.max_line_length:
if os.path.exists(os.path.join(path, PEP8_BIN)):
cmd = ([os.path.join(path, PEP8_BIN)] +
self._pep8_options(targetfile))
+#: W191
+'''
+ multiline string with tab in it'''
+#: E101 W191
+'''multiline string
+ with tabs
+ and spaces
+'''
+#: Okay
+'''sometimes, you just need to go nuts in a multiline string
+ and allow all sorts of crap
+ like mixed tabs and spaces
+
+or trailing whitespace
+or long long long long long long long long long long long long long long long long long lines
+''' # nopep8
+#: Okay
+'''this one
+ will get no warning
+even though the noqa comment is not immediately after the string
+''' + foo # noqa
+#
#: E101 W191
if foo is None and bar is "frop" and \
blah == 'yeah':
diff --git a/testsuite/W29.py b/testsuite/W29.py
index 2578f4f..42802ca 100644
--- a/testsuite/W29.py
+++ b/testsuite/W29.py
@@ -6,5 +6,8 @@ print
class Foo(object):
bang = 12
+#: W291
+'''multiline
+string with trailing whitespace'''
#: W292
# This line doesn't have a linefeed \ No newline at end of file
diff --git a/testsuite/W39no.py b/testsuite/W39no.py
new file mode 100644
index 0000000..2948b82
--- /dev/null
+++ b/testsuite/W39no.py
@@ -0,0 +1,6 @@
+#: Okay
+'''there is nothing wrong
+with a multiline string at EOF
+
+that happens to have a blank line in it
+'''