Passed
Branch DICOMAnonimization (c59297)
by Yang
02:05
created

test_LORIS_helper   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 4

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_number_extraction() 0 14 4
1
from LORIS_helper import number_extraction
2
3
4
def test_number_extraction():
5
    Prefix = "V"
6
    numbers = [1, 2, 3, 9, 10, 11, 12, 100, 101, 102]
7
8
    global timepoints
9
    timepoints = []
10
11
    for number in numbers:
12
        timepoints.append(Prefix + str(number))
13
14
    DualList = zip(numbers, timepoints)
15
16
    for tuple in DualList:
17
        assert str(tuple[0]) == number_extraction(tuple[1])[0]
18
19
if __name__ == '__main__':
20
    test_number_extraction()