diff --git a/tests/utils/io/test_data_reader.py b/tests/utils/io/test_data_reader.py index c55badc..e1724b0 100644 --- a/tests/utils/io/test_data_reader.py +++ b/tests/utils/io/test_data_reader.py @@ -33,6 +33,50 @@ 'xsi:schemaLocation': 'http://www.cdisc.org/ns/odm/v1.3 ' 'schema/odm/ODM1-3-1.xsd'}} ), + ('Hello World', {"string": "Hello World"}), + ('bd', {"object": {"a": "b", "c": "d"}}), + ('123', {"number": 123}), + ('-123', {"number": -123}), + ('123.4', {"number": 123.4}), + ('', {"null": None}), # empty tag + ('', {"null": None}), # empty tag + ('', {"null": None}), # explicit null + ('gold', {"color": "gold"}), + ('true', {"boolean": True}), + ('false', {"boolean": False}), + ('123', {"array": {"item": [1, 2, 3]}}), + ('' + '' + '1' + '2' + '3' + '' + 'true' + 'gold' + '123' + '' + 'b' + 'd' + '' + 'Hello World' + '', + { + "root":{ + "array": { + "item": [1, 2, 3] + }, + "boolean": True, + "color": "gold", + "number": 123, + "object": { + "a": "b", + "c": "d" + }, + "string": "Hello World" + } + }), + ('', {"ItemData": {"ItemOID": "redcap_survey_identifier", "Value": ""}}), + ] ) def test_read_xml(inp, expected):