summaryrefslogtreecommitdiff
path: root/testsuite/E30.py
diff options
context:
space:
mode:
authorNikhil Benesch <nikhil.benesch@gmail.com>2015-05-19 20:40:33 -0400
committerIan Lee <IanLee1521@gmail.com>2016-06-25 14:13:50 -0700
commit6b75c4de380c5e786d277851a7da8a581da53bcb (patch)
tree9af2652c530f6a77dd5dc35d53ec08d6c20c25bd /testsuite/E30.py
parentdc08dadd84369185f3c19782fd727dbf5029a056 (diff)
downloadpep8-6b75c4de380c5e786d277851a7da8a581da53bcb.tar.gz
Fix issue #400: Require two blank lines after toplevel def, class
Diffstat (limited to 'testsuite/E30.py')
-rw-r--r--testsuite/E30.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/E30.py b/testsuite/E30.py
index d2d7bf3..1aa1137 100644
--- a/testsuite/E30.py
+++ b/testsuite/E30.py
@@ -88,3 +88,32 @@ def function():
It gives error E303: too many blank lines (3)
"""
#:
+
+#: E305:7:1
+def a():
+ print
+
+ # comment
+
+ # another comment
+a()
+#: E305:8:1
+def a():
+ print
+
+ # comment
+
+ # another comment
+
+try:
+ a()
+except:
+ pass
+#: E305:5:1
+def a():
+ print
+
+# Two spaces before comments, too.
+if a():
+ a()
+#: