@@ -172,26 +172,28 @@ def get_step_positions(self, file_name):
172172 positions = []
173173 for step , infos in self .__steps_map .items ():
174174 positions = positions + [{'stepValue' : step , 'span' : i .span }
175- for i in infos if i .file_name == file_name ]
175+ for i in infos if str ( i .file_name ). lower () == str ( file_name ). lower () ]
176176 return positions
177177
178178 def _get_all_hooks (self , file_name ):
179179 all_hooks = []
180180 for hook in self .hooks :
181181 all_hooks = all_hooks + \
182182 [h for h in getattr (self , "__{}" .format (hook ))
183- if h .file_name == file_name ]
183+ if str ( h .file_name ). lower () == str ( file_name ). lower () ]
184184 return all_hooks
185185
186186 def get_all_methods_in (self , file_name ):
187187 methods = []
188188 for _ , infos in self .__steps_map .items ():
189- methods = methods + [i for i in infos if i .file_name == file_name ]
189+ # Using relative paths may lead to different spelling of the C drive (lower or capital C)
190+ methods = methods + [i for i in infos if str (i .file_name ).lower () == str (file_name ).lower ()]
190191 return methods + self ._get_all_hooks (file_name )
191192
192193 def is_file_cached (self , file_name ):
193194 for _ , infos in self .__steps_map .items ():
194- if any (i .file_name == file_name for i in infos ):
195+ # Using relative paths may lead to different spelling of the C drive (lower or capital C)
196+ if any (str (i .file_name ).lower () == str (file_name ).lower () for i in infos ):
195197 return True
196198 return False
197199
0 commit comments