MCPcopy
hub / github.com/facefusion/facefusion / test_retry_jobs

Function test_retry_jobs

tests/test_job_runner.py:127–162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125
126
127def test_retry_jobs() -> None:
128 args_1 =\
129 {
130 'source_path': get_test_example_file('source.jpg'),
131 'target_path': get_test_example_file('target-240p.mp4'),
132 'output_path': get_test_output_file('output-1.mp4')
133 }
134 args_2 =\
135 {
136 'source_path': get_test_example_file('source.jpg'),
137 'target_path': get_test_example_file('target-240p.mp4'),
138 'output_path': get_test_output_file('output-2.mp4')
139 }
140 args_3 =\
141 {
142 'source_path': get_test_example_file('source.jpg'),
143 'target_path': get_test_example_file('target-240p.jpg'),
144 'output_path': get_test_output_file('output-3.jpg')
145 }
146 halt_on_error = True
147
148 assert retry_jobs(process_step, halt_on_error) is False
149
150 create_job('job-test-retry-jobs-1')
151 create_job('job-test-retry-jobs-2')
152 add_step('job-test-retry-jobs-1', args_1)
153 add_step('job-test-retry-jobs-1', args_1)
154 add_step('job-test-retry-jobs-2', args_2)
155 add_step('job-test-retry-jobs-3', args_3)
156
157 assert retry_jobs(process_step, halt_on_error) is False
158
159 move_job_file('job-test-retry-jobs-1', 'failed')
160 move_job_file('job-test-retry-jobs-2', 'failed')
161
162 assert retry_jobs(process_step, halt_on_error) is True
163
164
165def test_run_steps() -> None:

Callers

nothing calls this directly

Calls 6

retry_jobsFunction · 0.90
create_jobFunction · 0.90
add_stepFunction · 0.90
move_job_fileFunction · 0.90
get_test_example_fileFunction · 0.85
get_test_output_fileFunction · 0.85

Tested by

no test coverage detected