mirror of
https://github.com/facefusion/facefusion.git
synced 2026-04-30 13:27:50 +02:00
reformat test_api_state.py
This commit is contained in:
+17
-6
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user