Skip to content

Commit 0a8d199

Browse files
committed
fix tests
1 parent a79ea7b commit 0a8d199

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

tests/data/dataconverter/readers/example/testdata.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"program_name": "Nexus Parser",
1717
"type": "2nd type",
1818
"type2": "2nd type",
19+
"@attribute_with_open_enum":"1st option",
1920
"date_value": "2022-01-22T12:14:12.05018+00:00",
2021
"date_value_units": "",
2122
"required_child": 1,

tests/dataconverter/test_validation.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,12 +1541,16 @@ def listify_template(data_dict: Template):
15411541
),
15421542
pytest.param(
15431543
alter_dict(
1544-
TEMPLATE,
1545-
"/ENTRY[my_entry]/INSTRUMENT[my_instrument]/SOURCE[my_source]/type",
1546-
"Wrong source type",
1544+
alter_dict(
1545+
TEMPLATE,
1546+
"/ENTRY[my_entry]/INSTRUMENT[my_instrument]/SOURCE[my_source]/type",
1547+
"Wrong source type",
1548+
),
1549+
"/ENTRY[my_entry]/INSTRUMENT[my_instrument]/SOURCE[my_source]/type/@custom",
1550+
True,
15471551
),
15481552
[
1549-
"The value at /ENTRY[my_entry]/INSTRUMENT[my_instrument]/SOURCE[my_source]/type does not match with the enumerated "
1553+
"The value 'Wrong source type' at /ENTRY[my_entry]/INSTRUMENT[my_instrument]/SOURCE[my_source]/type does not match with the enumerated "
15501554
"items from the open enumeration: ['Spallation Neutron Source', 'Pulsed Reactor Neutron Source', 'Reactor Neutron Source', "
15511555
"'Synchrotron X-ray Source', 'Pulsed Muon Source', 'Rotating Anode X-ray', 'Fixed Tube X-ray', 'UV Laser', 'Free-Electron Laser', "
15521556
"'Optical Laser', 'Ion Source', 'UV Plasma Source', 'Metal Jet X-ray', 'Laser', 'Dye Laser', 'Broadband Tunable Light Source', "

0 commit comments

Comments
 (0)