File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -1079,13 +1079,10 @@ def test_other():
10791079 mock_function .function_name = "target_function"
10801080 mock_function .parents = [] # No parent classes
10811081
1082- filtered_tests = discover_unit_tests (test_config , functions_to_optimize = [mock_function ])
1083- # The import filter is designed for high recall, so it may include both functions
1084- # because both test files import from the same module (mycode) that contains target_function
1085- assert len (filtered_tests ) >= 1 # Should find at least target_function
1082+ dummy_file_path = Path ("dummy.py" )
1083+ filtered_tests = discover_unit_tests (test_config , file_to_funcs_to_optimize = {dummy_file_path : [mock_function ]})
1084+ assert len (filtered_tests ) >= 1
10861085 assert "mycode.target_function" in filtered_tests
1087- # In a perfect world we'd filter out other_function, but conservative filtering
1088- # is acceptable for performance optimization purposes
10891086
10901087
10911088def test_analyze_imports_conditional_import ():
You can’t perform that action at this time.
0 commit comments