summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/E30.py5
-rw-r--r--testsuite/E30not.py10
-rw-r--r--testsuite/test_blank_lines.py4
3 files changed, 11 insertions, 8 deletions
diff --git a/testsuite/E30.py b/testsuite/E30.py
index 15fbdf3..8d1879b 100644
--- a/testsuite/E30.py
+++ b/testsuite/E30.py
@@ -16,11 +16,6 @@ class X:
#:
-#: E302:3:1
-#!python
-# -*- coding: utf-8 -*-
-def a():
- pass
#: E302:2:1
"""Main module."""
def _main():
diff --git a/testsuite/E30not.py b/testsuite/E30not.py
index ba0f742..a86b99e 100644
--- a/testsuite/E30not.py
+++ b/testsuite/E30not.py
@@ -177,3 +177,13 @@ def foo():
# for no E30x being emitted.
def bar(): pass
def baz(): pass
+#: Okay
+#!python
+# -*- coding: utf-8 -*-
+def a():
+ pass
+#: Okay
+def f(
+ a,
+):
+ pass
diff --git a/testsuite/test_blank_lines.py b/testsuite/test_blank_lines.py
index 2b37ad1..e239f8b 100644
--- a/testsuite/test_blank_lines.py
+++ b/testsuite/test_blank_lines.py
@@ -139,7 +139,6 @@ class AFarEnoughClass(object):
pass
""")
self.assertEqual([
- 'E302:4:1', # some_function
'E302:7:1', # another_function
'E302:14:1', # SomeCloseClass
], result)
@@ -438,7 +437,7 @@ def some_function():
def test_top_level_fewer_blank_lines(self):
"""
- It will trigger an error when less 2 blank lines are found
+ It will trigger an error when less 3 blank lines are found
before top level definitions.
"""
result = self.check("""# First comment line.
@@ -471,7 +470,6 @@ class AFarEnoughClass(object):
pass
""")
self.assertEqual([
- 'E302:5:1', # some_function
'E302:9:1', # another_function
'E302:17:1', # SomeCloseClass
], result)