Add more test cases for E402; issue #304
authorIan Lee <IanLee1521@gmail.com>
Tue, 16 Dec 2014 03:49:34 +0000 (19:49 -0800)
committerIan Lee <IanLee1521@gmail.com>
Sun, 21 Dec 2014 02:54:58 +0000 (18:54 -0800)
testsuite/E40.py

index d921c25f412ab97856b6acca98fb1c0eec05182c..1051e32cf8ed62b5df3961c0f9b05e2dcbff6845 100644 (file)
@@ -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