reformat test_api_state.py

This commit is contained in:
harisreedhar
2026-02-17 15:39:07 +05:30
committed by henryruhs
parent a94209507d
commit f36ae318fd
+17 -6
View File
@@ -25,12 +25,23 @@ def before_all() -> None:
@pytest.fixture(scope = 'module')
def test_client() -> Iterator[TestClient]:
program = ArgumentParser()
source_paths_action = program.add_argument('--source-paths', nargs = '+')
target_path_action = program.add_argument('--target-path')
execution_providers_action = program.add_argument('--execution-providers', nargs = '+')
args_store.register_argument(source_paths_action, scopes = [ 'api' ])
args_store.register_argument(target_path_action, scopes = [ 'api' ])
args_store.register_argument(execution_providers_action, scopes = [ 'api' ])
args_store.register_argument(
program.add_argument(
'--source-paths',
nargs = '+'),
scopes = [ 'api' ]
)
args_store.register_argument(
program.add_argument(
'--target-path'),
scopes = [ 'api' ]
)
args_store.register_argument(
program.add_argument(
'--execution-providers',
nargs = '+'),
scopes = [ 'api' ]
)
state_manager.init_item('execution_providers', [ 'cpu' ])
with TestClient(create_api()) as test_client: