def test_moves_on_gracefully_if_checkpointed_file_does_not_exist_yet( self, tmp_path): result_handler = PandasResultHandler(tmp_path / "dummy.csv", "csv") task = Task(name="Task", result_handler=result_handler) task_runner = TaskRunner(task) task_runner.upstream_states = {} old_state = Pending() new_state = Running() new_state = dsh.checkpoint_handler(task_runner, old_state, new_state) assert new_state.is_running()
def test_state_type_methods_with_running_state(self): state = Running() assert not state.is_pending() assert state.is_running() assert not state.is_retrying() assert not state.is_cached() assert not state.is_finished() assert not state.is_skipped() assert not state.is_scheduled() assert not state.is_successful() assert not state.is_failed() assert not state.is_mapped() assert not state.is_meta_state()