File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ from __future__ import absolute_import
2
+
3
+ from utils import check_on_input
4
+
5
+
6
+ NO_IMPORTS = ("""\
7
+ """ , """\
8
+ """ )
9
+
10
+ ONLY_FUTURE_IMPORTS = ("""\
11
+ from __future__ import print_function
12
+ """ , """\
13
+ from __future__ import print_function
14
+ """ )
15
+
16
+ ONLY_NORMAL_IMPORTS = ("""\
17
+ import foo
18
+ """ , """\
19
+ from __future__ import absolute_import
20
+ import foo
21
+ """ )
22
+
23
+ NORMAL_AND_FUTURE_IMPORTS = ("""\
24
+ from __future__ import print_function
25
+ import foo
26
+ """ , """\
27
+ from __future__ import print_function
28
+ from __future__ import absolute_import
29
+ import foo
30
+ """ )
31
+
32
+
33
+ def test_no_imports ():
34
+ check_on_input (* NO_IMPORTS )
35
+
36
+ def test_only_future_imports ():
37
+ check_on_input (* ONLY_FUTURE_IMPORTS )
38
+
39
+ def test_only_normal_imports ():
40
+ check_on_input (* ONLY_NORMAL_IMPORTS )
41
+
42
+ def test_normal_and_future_imports ():
43
+ check_on_input (* NORMAL_AND_FUTURE_IMPORTS )
You can’t perform that action at this time.
0 commit comments