MCPcopy
hub / github.com/facefusion/facefusion / test_finalize_steps

Function test_finalize_steps

tests/test_job_runner.py:196–230  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

194
195
196def test_finalize_steps() -> None:
197 args_1 =\
198 {
199 'source_path': get_test_example_file('source.jpg'),
200 'target_path': get_test_example_file('target-240p.mp4'),
201 'output_path': get_test_output_file('output-1.mp4')
202 }
203 args_2 =\
204 {
205 'source_path': get_test_example_file('source.jpg'),
206 'target_path': get_test_example_file('target-240p.mp4'),
207 'output_path': get_test_output_file('output-2.mp4')
208 }
209 args_3 =\
210 {
211 'source_path': get_test_example_file('source.jpg'),
212 'target_path': get_test_example_file('target-240p.jpg'),
213 'output_path': get_test_output_file('output-3.jpg')
214 }
215
216 create_job('job-test-finalize-steps')
217 add_step('job-test-finalize-steps', args_1)
218 add_step('job-test-finalize-steps', args_1)
219 add_step('job-test-finalize-steps', args_2)
220 add_step('job-test-finalize-steps', args_3)
221
222 copy_file(args_1.get('target_path'), get_test_output_file('output-1-job-test-finalize-steps-0.mp4'))
223 copy_file(args_1.get('target_path'), get_test_output_file('output-1-job-test-finalize-steps-1.mp4'))
224 copy_file(args_2.get('target_path'), get_test_output_file('output-2-job-test-finalize-steps-2.mp4'))
225 copy_file(args_3.get('target_path'), get_test_output_file('output-3-job-test-finalize-steps-3.jpg'))
226
227 assert finalize_steps('job-test-finalize-steps') is True
228 assert is_test_output_file('output-1.mp4') is True
229 assert is_test_output_file('output-2.mp4') is True
230 assert is_test_output_file('output-3.jpg') is True
231
232
233def test_collect_output_set() -> None:

Callers

nothing calls this directly

Calls 7

create_jobFunction · 0.90
add_stepFunction · 0.90
copy_fileFunction · 0.90
finalize_stepsFunction · 0.90
get_test_example_fileFunction · 0.85
get_test_output_fileFunction · 0.85
is_test_output_fileFunction · 0.85

Tested by

no test coverage detected