File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1313from pydantic .dataclasses import dataclass
1414from pytest import ExitCode
1515
16- from codeflash .cli_cmds .console import console , logger , progress_bar
16+ from codeflash .cli_cmds .console import console , logger
1717from codeflash .code_utils .code_utils import get_run_tmp_file , module_name_from_file_path
1818from codeflash .code_utils .compat import SAFE_SYS_EXECUTABLE
1919from codeflash .models .models import CodePosition , FunctionCalledInTest , TestsInFile
@@ -49,8 +49,8 @@ def discover_unit_tests(
4949 if not strategy :
5050 error_message = f"Unsupported test framework: { cfg .test_framework } "
5151 raise ValueError (error_message )
52- with progress_bar ( "Discovering unit tests…" , transient = True ):
53- return strategy (cfg , discover_only_these_tests )
52+
53+ return strategy (cfg , discover_only_these_tests )
5454
5555
5656def discover_tests_pytest (
Original file line number Diff line number Diff line change 88from typing import TYPE_CHECKING
99
1010from codeflash .api .aiservice import AiServiceClient , LocalAiServiceClient
11- from codeflash .cli_cmds .console import console , logger
11+ from codeflash .cli_cmds .console import console , logger , progress_bar
1212from codeflash .code_utils import env_utils
1313from codeflash .code_utils .code_replacer import normalize_code , normalize_node
1414from codeflash .code_utils .code_utils import get_run_tmp_file
@@ -95,9 +95,8 @@ def run(self) -> None:
9595 return
9696
9797 console .rule ()
98- logger .info (f"Discovering existing unit tests in { self .test_cfg .tests_root } …" )
99- console .rule ()
100- function_to_tests : dict [str , list [FunctionCalledInTest ]] = discover_unit_tests (self .test_cfg )
98+ with progress_bar (f"Discovering existing unit tests in { self .test_cfg .tests_root } …" , transient = True ):
99+ function_to_tests : dict [str , list [FunctionCalledInTest ]] = discover_unit_tests (self .test_cfg )
101100 num_discovered_tests : int = sum ([len (value ) for value in function_to_tests .values ()])
102101 console .rule ()
103102 logger .info (f"Discovered { num_discovered_tests } existing unit tests in { self .test_cfg .tests_root } " )
You can’t perform that action at this time.
0 commit comments