Completed
Push — master ( d27fdd...fc215c )
by Piotr
01:01
created

test_version_data_exists()   C

Complexity

Conditions 10

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 10
c 1
b 0
f 0
dl 0
loc 10
rs 6

How to fix   Complexity   

Complexity

Complex classes like test_version_data_exists() often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

1
from mountapi import version
2
3
4
def test_version_data_exists():
5
    assert version.__name__
6
    assert version.__description__
7
    assert version.__url__
8
    assert version.__version__
9
    assert version.__build__
10
    assert version.__author__
11
    assert version.__author_email__
12
    assert version.__license__
13
    assert version.__copyright__
14