Add some normalizer tests about imports.

This commit is contained in:
Dave Halter
2017-06-05 23:29:25 +02:00
parent 3e95793756
commit c3d101f582
3 changed files with 65 additions and 3 deletions

View File

@@ -0,0 +1,39 @@
#: E401:7
import os, sys
# Okay
import os
import sys
from subprocess import Popen, PIPE
from myclass import MyClass
from foo.bar.yourclass import YourClass
import myclass
import foo.bar.yourclass
# All Okay from here until the definition of VERSION
__all__ = ['abc']
import foo
__version__ = "42"
import foo
__author__ = "Simon Gomizelj"
import foo
try:
import foo
except ImportError:
pass
else:
print('imported foo')
finally:
print('made attempt to import foo')
import bar
VERSION = '1.2.3'
#: E402
import foo
#: E402
import foo