()
| 125 | |
| 126 | |
| 127 | def 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 | |
| 165 | def test_run_steps() -> None: |
nothing calls this directly
no test coverage detected