Skip to content

Commit 75cf4e0

Browse files
committed
fix tests
1 parent 3dd8458 commit 75cf4e0

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
@@ -1703,12 +1703,16 @@ def format_error_message(msg: str) -> str:
17031703
),
17041704
pytest.param(
17051705
alter_dict(
1706-
TEMPLATE,
1707-
"/ENTRY[my_entry]/INSTRUMENT[my_instrument]/SOURCE[my_source]/type",
1708-
"Wrong source type",
1706+
alter_dict(
1707+
TEMPLATE,
1708+
"/ENTRY[my_entry]/INSTRUMENT[my_instrument]/SOURCE[my_source]/type",
1709+
"Wrong source type",
1710+
),
1711+
"/ENTRY[my_entry]/INSTRUMENT[my_instrument]/SOURCE[my_source]/type/@custom",
1712+
True,
17091713
),
17101714
[
1711-
"The value at /ENTRY[my_entry]/INSTRUMENT[my_instrument]/SOURCE[my_source]/type does not match with the enumerated "
1715+
"The value 'Wrong source type' at /ENTRY[my_entry]/INSTRUMENT[my_instrument]/SOURCE[my_source]/type does not match with the enumerated "
17121716
"items from the open enumeration: ['Spallation Neutron Source', 'Pulsed Reactor Neutron Source', 'Reactor Neutron Source', "
17131717
"'Synchrotron X-ray Source', 'Pulsed Muon Source', 'Rotating Anode X-ray', 'Fixed Tube X-ray', 'UV Laser', 'Free-Electron Laser', "
17141718
"'Optical Laser', 'Ion Source', 'UV Plasma Source', 'Metal Jet X-ray', 'Laser', 'Dye Laser', 'Broadband Tunable Light Source', "

0 commit comments

Comments
 (0)