Skip to content

Commit d6da0b8

Browse files
committed
Add more test cases for E402; issue #304
1 parent 17e3b14 commit d6da0b8

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

testsuite/E40.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,28 @@
1111

1212
import myclass
1313
import foo.bar.yourclass
14+
#: E402
15+
__all__ = ['abc']
16+
17+
import foo
18+
#: Okay
19+
try:
20+
import foo
21+
except:
22+
pass
23+
else:
24+
print('imported foo')
25+
finally:
26+
print('made attempt to import foo')
27+
28+
import bar
29+
#: E402
30+
VERSION = '1.2.3'
31+
32+
import foo
33+
#: E402
34+
import foo
35+
36+
a = 1
37+
38+
import bar

0 commit comments

Comments
 (0)