test_LORIS_helper.test_number_extraction()   A
last analyzed

Complexity

Conditions 4

Size

Total Lines 14
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 10
nop 0
dl 0
loc 14
rs 9.9
c 0
b 0
f 0
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()