MCPcopy
hub / github.com/facefusion/facefusion / test_validate_args

Function test_validate_args

tests/test_program_helper.py:16–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15
16def test_validate_args() -> None:
17 program = ArgumentParser()
18 program.add_argument('--test-1', default = 'test_1', choices = [ 'test_1', 'test_2' ])
19
20 assert validate_args(program) is True
21
22 subparsers = program.add_subparsers()
23 sub_program = subparsers.add_parser('sub-command')
24 sub_program.add_argument('--test-2', default = 'test_2', choices = [ 'test_1', 'test_2' ])
25
26 assert validate_args(program) is True
27
28 for action in sub_program._actions:
29 if action.dest == 'test_2':
30 action.default = 'test_3'
31
32 assert validate_args(program) is False
33
34
35def test_validate_actions() -> None:

Callers

nothing calls this directly

Calls 1

validate_argsFunction · 0.90

Tested by

no test coverage detected