Skip to content

Commit

Permalink
test: ✅ add array to test data
Browse files Browse the repository at this point in the history
  • Loading branch information
signekb committed Feb 21, 2025
1 parent bc97596 commit 2493c25
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/core/test_extract_resource_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
"survey_duration": ["PT1M30S", "PT1H30M", "PT1H"],
"survey_yearmonth": ["2020-01", "2021-02", "2022-03"],
"survey_geopoint": ["1.0,2.0", "3.0,4.0", "5.0,6.0"],
"survey_array": [
'[{"name":"value1", "details": {"subfield1": "1", "subfield2": "2"}}]',
'[{"name":"value2", "details": {"subfield1": "5", "subfield2": "6"}}]',
'[{"name":"value3", "details": {"subfield1": "7", "subfield2": "8"}}]',
],
}
)
schema_tidy_data = {
Expand All @@ -41,6 +46,7 @@
{"name": "survey_duration", "type": "duration"},
{"name": "survey_yearmonth", "type": "yearmonth"},
{"name": "survey_geopoint", "type": "geopoint"},
{"name": "survey_array", "type": "array"},
]
}

Expand All @@ -61,6 +67,11 @@
"survey_duration": ["1:00", "PT1H30M", "PT1H"],
"survey_yearmonth": ["2020 01", "02-2021", "2022-03"],
"survey_geopoint": ["1.0,2.0", "3.0", "5.0,6.0"],
"survey_array": [
'[{"name":"value1", "details": {"subfield1": "1", "subfield2": "2"}}]',
"",
'[{"name":"value3"}]',
],
},
strict=False,
)
Expand All @@ -81,6 +92,7 @@
{"name": "survey_duration", "type": "string"},
{"name": "survey_yearmonth", "type": "string"},
{"name": "survey_geopoint", "type": "string"},
{"name": "survey_array", "type": "array"},
]
}

Expand Down

0 comments on commit 2493c25

Please sign in to comment.