Passed
Pull Request — master (#1)
by Konstantinos
59s
created

test_algorithm_params   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 19
dl 0
loc 24
rs 10
c 0
b 0
f 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A algorithm_parameters() 0 12 1
A test_algorithm_parameters() 0 6 1
1
import pytest
2
3
@pytest.fixture
4
def algorithm_parameters():
5
    from artificial_artwork.algorithm import AlogirthmParameters
6
    return AlogirthmParameters(
7
        'content_image',
8
        'style_image',
9
        [
10
            ('layer-1', 0.5),
11
            ('layer-2', 0.5),
12
        ],
13
        'termination_condition',
14
        'output_path',
15
    )
16
17
18
def test_algorithm_parameters(algorithm_parameters):
19
    assert hasattr(algorithm_parameters, 'content_image')
20
    assert hasattr(algorithm_parameters, 'style_image')
21
    assert hasattr(algorithm_parameters, 'style_layers')
22
    assert hasattr(algorithm_parameters, 'termination_condition')
23
    assert hasattr(algorithm_parameters, 'output_path')
24