Skip to content

Commit a7f3673

Browse files
authored
removing match case (#63)
1 parent 7edd2c2 commit a7f3673

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

test/test_subject_age.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@
66
(45, "QuantitativeValue"), ("XX", None)]
77

88

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):
1111
data_subject_table = pd.DataFrame(data={'age': [age]})
1212
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

Comments
 (0)