@@ -152,66 +152,77 @@ def test_lazy_imports():
152152 imported = Module ("foo.two" ),
153153 line_number = 2 ,
154154 line_contents = "lazy import foo.two" ,
155+ is_lazy = True ,
155156 ),
156157 DirectImport (
157158 importer = Module ("foo.one.blue" ),
158159 imported = Module ("externalone" ),
159160 line_number = 3 ,
160161 line_contents = "lazy import externalone" ,
162+ is_lazy = True ,
161163 ),
162164 DirectImport (
163165 importer = Module ("foo.one.blue" ),
164166 imported = Module ("externaltwo" ),
165167 line_number = 4 ,
166168 line_contents = "lazy import externaltwo.subpackage # with comment afterwards." ,
169+ is_lazy = True ,
167170 ),
168171 DirectImport (
169172 importer = Module ("foo.one.blue" ),
170173 imported = Module ("foo.one.green" ),
171174 line_number = 8 ,
172175 line_contents = "lazy from foo.one import green" ,
176+ is_lazy = True ,
173177 ),
174178 DirectImport (
175179 importer = Module ("foo.one.blue" ),
176180 imported = Module ("foo.two.yellow" ),
177181 line_number = 9 ,
178182 line_contents = "lazy from foo.two import yellow" ,
183+ is_lazy = True ,
179184 ),
180185 DirectImport (
181186 importer = Module ("foo.one.blue" ),
182187 imported = Module ("foo.three" ),
183188 line_number = 11 ,
184189 line_contents = "lazy from foo import three" ,
190+ is_lazy = True ,
185191 ),
186192 DirectImport (
187193 importer = Module ("foo.one.blue" ),
188194 imported = Module ("external" ),
189195 line_number = 12 ,
190196 line_contents = "lazy from external import one" ,
197+ is_lazy = True ,
191198 ),
192199 DirectImport (
193200 importer = Module ("foo.one.blue" ),
194201 imported = Module ("external" ),
195202 line_number = 13 ,
196203 line_contents = "lazy from external.two import blue # with comment afterwards." ,
204+ is_lazy = True ,
197205 ),
198206 DirectImport (
199207 importer = Module ("foo.one.blue" ),
200208 imported = Module ("foo.one.green" ),
201209 line_number = 16 ,
202210 line_contents = "lazy from . import green" ,
211+ is_lazy = True ,
203212 ),
204213 DirectImport (
205214 importer = Module ("foo.one.blue" ),
206215 imported = Module ("foo.two.yellow" ),
207216 line_number = 17 ,
208217 line_contents = "lazy from ..two import yellow" ,
218+ is_lazy = True ,
209219 ),
210220 DirectImport (
211221 importer = Module ("foo.one.blue" ),
212222 imported = Module ("foo.three" ),
213223 line_number = 18 ,
214224 line_contents = "lazy from .. import three" ,
225+ is_lazy = True ,
215226 ),
216227 }
217228 }
0 commit comments