From a7f3673961795b0044181efdf1dded4803e4c121 Mon Sep 17 00:00:00 2001 From: Peyman Najafi Date: Fri, 21 Jun 2024 15:51:20 +0200 Subject: [PATCH] removing match case (#63) --- test/test_subject_age.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) 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