@@ -23,37 +23,82 @@ def test_simple_completion(self):
23
23
self .assertSetEqual (
24
24
self .module_gatherer .complete (10 , "import zza" ), {"zzabc" , "zzabd" }
25
25
)
26
+ self .assertSetEqual (
27
+ self .module_gatherer .complete (11 , "import zza" ), {"zzabc" , "zzabd" }
28
+ )
26
29
27
30
def test_import_empty (self ):
28
31
self .assertSetEqual (
29
32
self .module_gatherer .complete (13 , "import zzabc." ),
30
33
{"zzabc.e" , "zzabc.f" },
31
34
)
35
+ self .assertSetEqual (
36
+ self .module_gatherer .complete (14 , "import zzabc." ),
37
+ {"zzabc.e" , "zzabc.f" },
38
+ )
32
39
33
40
def test_import (self ):
34
41
self .assertSetEqual (
35
42
self .module_gatherer .complete (14 , "import zzefg.a" ),
36
43
{"zzefg.a1" , "zzefg.a2" },
37
44
)
45
+ self .assertSetEqual (
46
+ self .module_gatherer .complete (15 , "import zzefg.a" ),
47
+ {"zzefg.a1" , "zzefg.a2" },
48
+ )
38
49
39
50
@unittest .expectedFailure
40
51
def test_import_empty (self ):
41
52
self .assertSetEqual (
42
53
self .module_gatherer .complete (7 , "import " ),
43
54
{"zzabc" , "zzabd" , "zzefg" },
44
55
)
56
+ self .assertSetEqual (
57
+ self .module_gatherer .complete (8 , "import " ),
58
+ {"zzabc" , "zzabd" , "zzefg" },
59
+ )
45
60
46
61
@unittest .expectedFailure
47
62
def test_from_import_empty (self ):
63
+ self .assertSetEqual (
64
+ self .module_gatherer .complete (5 , "from " ), {"zzabc" , "zzabd" , "zzefg" }
65
+ )
66
+ self .assertSetEqual (
67
+ self .module_gatherer .complete (6 , "from " ), {"zzabc" , "zzabd" , "zzefg" }
68
+ )
69
+
70
+ @unittest .expectedFailure
71
+ def test_from_module_import_empty (self ):
48
72
self .assertSetEqual (
49
73
self .module_gatherer .complete (18 , "from zzabc import " ), {"e" , "f" }
50
74
)
75
+ self .assertSetEqual (
76
+ self .module_gatherer .complete (19 , "from zzabc import " ), {"e" , "f" }
77
+ )
78
+ self .assertSetEqual (
79
+ self .module_gatherer .complete (19 , "from zzabc import " ), {"e" , "f" }
80
+ )
81
+ self .assertSetEqual (
82
+ self .module_gatherer .complete (19 , "from zzabc import " ), {"e" , "f" }
83
+ )
51
84
52
- def test_from_import (self ):
85
+ def test_from_module_import (self ):
53
86
self .assertSetEqual (
54
87
self .module_gatherer .complete (19 , "from zzefg import a" ),
55
88
{"a1" , "a2" },
56
89
)
90
+ self .assertSetEqual (
91
+ self .module_gatherer .complete (20 , "from zzefg import a" ),
92
+ {"a1" , "a2" },
93
+ )
94
+ self .assertSetEqual (
95
+ self .module_gatherer .complete (20 , "from zzefg import a" ),
96
+ {"a1" , "a2" },
97
+ )
98
+ self .assertSetEqual (
99
+ self .module_gatherer .complete (20 , "from zzefg import a" ),
100
+ {"a1" , "a2" },
101
+ )
57
102
58
103
59
104
class TestRealComplete (unittest .TestCase ):
@@ -150,3 +195,7 @@ def test_simple_symbolic_link_loop(self):
150
195
filepaths .remove ("Left.toRight" )
151
196
filepaths .remove (thing )
152
197
self .assertFalse (filepaths )
198
+
199
+
200
+ if __name__ == "__main__" :
201
+ unittest .main ()
0 commit comments