File tree Expand file tree Collapse file tree 2 files changed +13
-63
lines changed Expand file tree Collapse file tree 2 files changed +13
-63
lines changed Original file line number Diff line number Diff line change @@ -186,15 +186,19 @@ def process_test_files(
186186 jedi_project = jedi .Project (path = project_root_path )
187187
188188 for test_file , functions in file_to_test_map .items ():
189- script = jedi .Script (path = test_file , project = jedi_project )
190- test_functions = set ()
191-
192- all_names = script .get_names (all_scopes = True , references = True )
193- all_defs = script .get_names (all_scopes = True , definitions = True )
194- all_names_top = script .get_names (all_scopes = True )
195-
196- top_level_functions = {name .name : name for name in all_names_top if name .type == "function" }
197- top_level_classes = {name .name : name for name in all_names_top if name .type == "class" }
189+ try :
190+ script = jedi .Script (path = test_file , project = jedi_project )
191+ test_functions = set ()
192+
193+ all_names = script .get_names (all_scopes = True , references = True )
194+ all_defs = script .get_names (all_scopes = True , definitions = True )
195+ all_names_top = script .get_names (all_scopes = True )
196+
197+ top_level_functions = {name .name : name for name in all_names_top if name .type == "function" }
198+ top_level_classes = {name .name : name for name in all_names_top if name .type == "class" }
199+ except Exception as e :
200+ logger .debug (f"Failed to get jedi script for { test_file } : { e } " )
201+ continue
198202
199203 if test_framework == "pytest" :
200204 for function in functions :
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments