diff --git a/test/test_subject_age.py b/test/test_subject_age.py index 1a6c772..96b0bb0 100644 --- a/test/test_subject_age.py +++ b/test/test_subject_age.py @@ -6,17 +6,16 @@ (45, "QuantitativeValue"), ("XX", None)] -@ pytest.mark.parametrize("age,type", example_ages) -def test_subject_age(age, type): +@ pytest.mark.parametrize("age,age_type", example_ages) +def test_subject_age(age, age_type): data_subject_table = pd.DataFrame(data={'age': [age]}) openminds_age = create_openminds_age(data_subject_table) - match type: - case "QuantitativeValueRange": - assert openminds_age.type_ == 'https://openminds.ebrains.eu/core/QuantitativeValueRange' - assert openminds_age.max_value is None - assert openminds_age.min_value == 89 - case "QuantitativeValue": - assert openminds_age.type_ == 'https://openminds.ebrains.eu/core/QuantitativeValue' - assert openminds_age.value == age - case None: - assert openminds_age is None + if age_type == "QuantitativeValueRange": + assert openminds_age.type_ == 'https://openminds.ebrains.eu/core/QuantitativeValueRange' + assert openminds_age.max_value is None + assert openminds_age.min_value == 89 + if age_type == "QuantitativeValue": + assert openminds_age.type_ == 'https://openminds.ebrains.eu/core/QuantitativeValue' + assert openminds_age.value == age + if age_type == None: + assert openminds_age is None