Пример #1
0
def test_initial_task_creates_task():
    workflow = workflow_completeness.CompletenessWorkflow()
    user_args = {
        "Source": "./some_real_source_folder",
        "Check for page_data in meta.yml": False,
        "Check ALTO OCR xml files": False,
        "Check OCR xml files are utf-8": False
    }

    mock_builder = Mock()
    workflow.initial_task(task_builder=mock_builder, **user_args)
    assert \
        mock_builder.add_subtask.called is True and \
        mock_builder.add_subtask.call_args[1]['subtask'].batch_root == user_args['Source']
Пример #2
0
def unconfigured_workflow():
    workflow = workflow = workflow_completeness.CompletenessWorkflow()
    user_options = {i.label_text: i.data for i in workflow.user_options()}

    return workflow, user_options
Пример #3
0
def test_completeness_workflow_options(index, label):
    workflow = workflow_completeness.CompletenessWorkflow()
    user_options = workflow.user_options()
    assert len(user_options) > 0
    assert user_options[index].label_text == label