MCPcopy
hub / github.com/facefusion/facefusion / test_job_run_all

Function test_job_run_all

tests/test_cli_job_runner.py:53–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51
52
53def test_job_run_all() -> None:
54 commands = [ sys.executable, 'facefusion.py', 'job-run-all', '--jobs-path', get_test_jobs_directory(), '--halt-on-error' ]
55
56 assert subprocess.run(commands).returncode == 1
57
58 commands = [ sys.executable, 'facefusion.py', 'job-create', 'test-job-run-all-1', '--jobs-path', get_test_jobs_directory() ]
59 subprocess.run(commands)
60
61 commands = [ sys.executable, 'facefusion.py', 'job-create', 'test-job-run-all-2', '--jobs-path', get_test_jobs_directory() ]
62 subprocess.run(commands)
63
64 commands = [ sys.executable, 'facefusion.py', 'job-add-step', 'test-job-run-all-1', '--jobs-path', get_test_jobs_directory(), '--processors', 'face_debugger', '-t', get_test_example_file('target-240p.jpg'), '-o', get_test_output_file('test-job-run-all-1.jpg') ]
65 subprocess.run(commands)
66
67 commands = [ sys.executable, 'facefusion.py', 'job-add-step', 'test-job-run-all-2', '--jobs-path', get_test_jobs_directory(), '--processors', 'face_debugger', '-t', get_test_example_file('target-240p.mp4'), '-o', get_test_output_file('test-job-run-all-2.mp4'), '--trim-frame-end', '1' ]
68 subprocess.run(commands)
69
70 commands = [ sys.executable, 'facefusion.py', 'job-add-step', 'test-job-run-all-2', '--jobs-path', get_test_jobs_directory(), '--processors', 'face_debugger', '-t', get_test_example_file('target-240p.mp4'), '-o', get_test_output_file('test-job-run-all-2.mp4'), '--trim-frame-start', '0', '--trim-frame-end', '1' ]
71 subprocess.run(commands)
72
73 commands = [ sys.executable, 'facefusion.py', 'job-run-all', '--jobs-path', get_test_jobs_directory(), '--halt-on-error' ]
74
75 assert subprocess.run(commands).returncode == 1
76
77 commands = [ sys.executable, 'facefusion.py', 'job-submit-all', '--jobs-path', get_test_jobs_directory(), '--halt-on-error' ]
78 subprocess.run(commands)
79
80 commands = [ sys.executable, 'facefusion.py', 'job-run-all', '--jobs-path', get_test_jobs_directory(), '--halt-on-error' ]
81
82 assert subprocess.run(commands).returncode == 0
83 assert subprocess.run(commands).returncode == 1
84 assert is_test_output_file('test-job-run-all-1.jpg') is True
85 assert is_test_output_file('test-job-run-all-2.mp4') is True
86
87
88def test_job_retry() -> None:

Callers

nothing calls this directly

Calls 4

get_test_jobs_directoryFunction · 0.85
get_test_example_fileFunction · 0.85
get_test_output_fileFunction · 0.85
is_test_output_fileFunction · 0.85

Tested by

no test coverage detected