| Total Complexity | 3 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | from LORIS.timepoint import LORIS_timepoint |
||
| 2 | import unittest |
||
| 3 | |||
| 4 | class UT_LORISTimepoint(unittest.TestCase): |
||
| 5 | |||
| 6 | @staticmethod |
||
| 7 | def test_visit_number_extraction(): |
||
| 8 | Prefix = "V" |
||
| 9 | numbers = [1, 2, 3, 9] |
||
| 10 | |||
| 11 | global timepoints |
||
| 12 | timepoints = [] |
||
| 13 | |||
| 14 | for number in numbers: |
||
| 15 | timepoints.append(Prefix + str(number)) |
||
| 16 | |||
| 17 | DualList = zip(numbers, timepoints) |
||
| 18 | |||
| 19 | for tupleItem in DualList: |
||
| 20 | assert str(tupleItem[0]) == LORIS_timepoint.visit_number_extraction(tupleItem[1])[0] |
||
| 21 | |||
| 22 | # todo: 10+ visit number WILL FAIL! |
||
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.