MCPcopy
hub / github.com/facefusion/facefusion / test_job_remix

Function test_job_remix

tests/test_cli_job_manager.py:139–160  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137
138
139def test_job_remix() -> None:
140 commands = [ sys.executable, 'facefusion.py', 'job-remix-step', 'test-job-remix-step', '0', '--jobs-path', get_test_jobs_directory(), '-s', get_test_example_file('source.jpg'), '-o', get_test_output_file('test-job-remix-step.jpg') ]
141
142 assert subprocess.run(commands).returncode == 1
143 assert count_step_total('test-job-remix-step') == 0
144
145 commands = [ sys.executable, 'facefusion.py', 'job-create', 'test-job-remix-step', '--jobs-path', get_test_jobs_directory() ]
146 subprocess.run(commands)
147
148 commands = [ sys.executable, 'facefusion.py', 'job-add-step', 'test-job-remix-step', '--jobs-path', get_test_jobs_directory(), '-s', get_test_example_file('source.jpg'), '-t', get_test_example_file('target-240p.jpg'), '-o', get_test_output_file('test-job-remix-step.jpg') ]
149 subprocess.run(commands)
150
151 commands = [ sys.executable, 'facefusion.py', 'job-remix-step', 'test-job-remix-step', '0', '--jobs-path', get_test_jobs_directory(), '-s', get_test_example_file('source.jpg'), '-o', get_test_output_file('test-job-remix-step.jpg') ]
152
153 assert count_step_total('test-job-remix-step') == 1
154 assert subprocess.run(commands).returncode == 0
155 assert count_step_total('test-job-remix-step') == 2
156
157 commands = [ sys.executable, 'facefusion.py', 'job-remix-step', 'test-job-remix-step', '-1', '--jobs-path', get_test_jobs_directory(), '-s', get_test_example_file('source.jpg'), '-o', get_test_output_file('test-job-remix-step.jpg') ]
158
159 assert subprocess.run(commands).returncode == 0
160 assert count_step_total('test-job-remix-step') == 3
161
162
163def test_job_insert_step() -> None:

Callers

nothing calls this directly

Calls 4

count_step_totalFunction · 0.90
get_test_jobs_directoryFunction · 0.85
get_test_example_fileFunction · 0.85
get_test_output_fileFunction · 0.85

Tested by

no test coverage detected