@@ -297,7 +297,7 @@ def filter_test_files_by_imports(
297297 else :
298298 logger .debug (f"Skipping { test_file } - no relevant imports found" )
299299
300- logger .info (f"Import filter: Processing { len (filtered_map )} /{ len (file_to_test_map )} test files" )
300+ logger .debug (f"Import filter: Processing { len (filtered_map )} /{ len (file_to_test_map )} test files" )
301301 return filtered_map , import_results
302302
303303
@@ -491,27 +491,12 @@ def process_test_files(
491491
492492 function_to_test_map = defaultdict (set )
493493 jedi_project = jedi .Project (path = project_root_path )
494- tests_cache = TestsCache ()
495494
496495 with test_files_progress_bar (total = len (file_to_test_map ), description = "Processing test files" ) as (
497496 progress ,
498497 task_id ,
499498 ):
500499 for test_file , functions in file_to_test_map .items ():
501- file_hash = TestsCache .compute_file_hash (test_file )
502- cached_tests = tests_cache .get_tests_for_file (str (test_file ), file_hash )
503- if cached_tests :
504- self_cur = tests_cache .cur
505- self_cur .execute (
506- "SELECT qualified_name_with_modules_from_root FROM discovered_tests WHERE file_path = ? AND file_hash = ?" ,
507- (str (test_file ), file_hash ),
508- )
509- qualified_names = [row [0 ] for row in self_cur .fetchall ()]
510- for cached , qualified_name in zip (cached_tests , qualified_names ):
511- function_to_test_map [qualified_name ].add (cached )
512- progress .advance (task_id )
513- continue
514-
515500 try :
516501 script = jedi .Script (path = test_file , project = jedi_project )
517502 test_functions = set ()
@@ -636,18 +621,6 @@ def process_test_files(
636621 )
637622 qualified_name_with_modules_from_root = f"{ module_name_from_file_path (definition [0 ].module_path , project_root_path )} .{ full_name_without_module_prefix } "
638623
639- tests_cache .insert_test (
640- file_path = str (test_file ),
641- file_hash = file_hash ,
642- qualified_name_with_modules_from_root = qualified_name_with_modules_from_root ,
643- function_name = scope ,
644- test_class = scope_test_class ,
645- test_function = scope_test_function ,
646- test_type = test_type ,
647- line_number = name .line ,
648- col_number = name .column ,
649- )
650-
651624 function_to_test_map [qualified_name_with_modules_from_root ].add (
652625 FunctionCalledInTest (
653626 tests_in_file = TestsInFile (
@@ -662,5 +635,4 @@ def process_test_files(
662635
663636 progress .advance (task_id )
664637
665- tests_cache .close ()
666638 return {function : list (tests ) for function , tests in function_to_test_map .items ()}
0 commit comments