예제 #1
0
def test_fail_pipelines_are_equal(good_pipeline):
    test_operations_dict = {'123123123': good_operation,
                            '234234234': good_operation}

    compare_pipeline = Pipeline(id='Random-UUID-123123123123123',
                                name='test-pipeline',
                                runtime='kfp',
                                runtime_config='default_kfp')

    for key, operation in test_operations_dict.items():
        compare_pipeline.operations[key] = operation

    with pytest.raises(AssertionError):
        assert compare_pipeline == good_pipeline
예제 #2
0
def test_pipelines_are_equal(good_pipeline):
    compare_pipeline = Pipeline(id='Random-UUID-123123123123123',
                                name='test-pipeline',
                                runtime='kfp',
                                runtime_config='default_kfp')

    assert compare_pipeline == good_pipeline
예제 #3
0
def good_pipeline():
    test_pipeline = Pipeline(id='Random-UUID-123123123123123',
                             name='test-pipeline',
                             runtime='kfp',
                             runtime_config='default_kfp')
    return test_pipeline
예제 #4
0
def test_fail_create_pipeline_missing_runtime_config():
    with pytest.raises(TypeError):
        Pipeline(id='Random-UUID-123123123123123',
                 name='test-pipeline',
                 runtime='kfp')
예제 #5
0
def test_fail_create_pipeline_missing_name():
    with pytest.raises(TypeError):
        Pipeline(id='Random-UUID-123123123123123',
                 runtime='kfp',
                 runtime_config='default_kfp')
예제 #6
0
def test_fail_create_pipeline_missing_id():
    with pytest.raises(TypeError):
        Pipeline(name='test-pipeline',
                 runtime='kfp',
                 runtime_config='default_kfp')