|
6 | 6 | (45, "QuantitativeValue"), ("XX", None)] |
7 | 7 |
|
8 | 8 |
|
9 | | -@ pytest.mark.parametrize("age,type", example_ages) |
10 | | -def test_subject_age(age, type): |
| 9 | +@ pytest.mark.parametrize("age,age_type", example_ages) |
| 10 | +def test_subject_age(age, age_type): |
11 | 11 | data_subject_table = pd.DataFrame(data={'age': [age]}) |
12 | 12 | openminds_age = create_openminds_age(data_subject_table) |
13 | | - match type: |
14 | | - case "QuantitativeValueRange": |
15 | | - assert openminds_age.type_ == 'https://openminds.ebrains.eu/core/QuantitativeValueRange' |
16 | | - assert openminds_age.max_value is None |
17 | | - assert openminds_age.min_value == 89 |
18 | | - case "QuantitativeValue": |
19 | | - assert openminds_age.type_ == 'https://openminds.ebrains.eu/core/QuantitativeValue' |
20 | | - assert openminds_age.value == age |
21 | | - case None: |
22 | | - assert openminds_age is None |
| 13 | + if age_type == "QuantitativeValueRange": |
| 14 | + assert openminds_age.type_ == 'https://openminds.ebrains.eu/core/QuantitativeValueRange' |
| 15 | + assert openminds_age.max_value is None |
| 16 | + assert openminds_age.min_value == 89 |
| 17 | + if age_type == "QuantitativeValue": |
| 18 | + assert openminds_age.type_ == 'https://openminds.ebrains.eu/core/QuantitativeValue' |
| 19 | + assert openminds_age.value == age |
| 20 | + if age_type == None: |
| 21 | + assert openminds_age is None |
0 commit comments