summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lee <IanLee1521@gmail.com>2014-12-15 19:49:34 -0800
committerIan Lee <IanLee1521@gmail.com>2014-12-20 18:54:58 -0800
commitd6da0b82a3c5d13c51d61da01c1a6eb3be16cf9a (patch)
tree1e033c8faf878d2db1d06e9cba38eb340cf8f2e8
parent17e3b14a97c19704bf35221f89ac0567777ed7ad (diff)
downloadpep8-d6da0b82a3c5d13c51d61da01c1a6eb3be16cf9a.tar.gz
Add more test cases for E402; issue #304
-rw-r--r--testsuite/E40.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/E40.py b/testsuite/E40.py
index d921c25..1051e32 100644
--- a/testsuite/E40.py
+++ b/testsuite/E40.py
@@ -11,3 +11,28 @@ from foo.bar.yourclass import YourClass
import myclass
import foo.bar.yourclass
+#: E402
+__all__ = ['abc']
+
+import foo
+#: Okay
+try:
+ import foo
+except:
+ pass
+else:
+ print('imported foo')
+finally:
+ print('made attempt to import foo')
+
+import bar
+#: E402
+VERSION = '1.2.3'
+
+import foo
+#: E402
+import foo
+
+a = 1
+
+import bar