Skip to content

Commit

Permalink
Merge pull request #374 from dls-controls/fix/hdf5-xml-layout
Browse files Browse the repository at this point in the history
HDF5WriterPart: remove auto_ndattr_default as invalid xml for schema
  • Loading branch information
BenBradnick authored May 26, 2022
2 parents 95706b0 + 97060e5 commit b989233
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion malcolm/modules/ADCore/parts/hdfwriterpart.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def make_layout_xml(
write_all_nd_attributes: bool = False,
) -> str:
# Make a root element with an NXEntry
root_el = ET.Element("hdf5_layout", auto_ndattr_default="false")
root_el = ET.Element("hdf5_layout")
entry_el = ET.SubElement(root_el, "group", name="entry")
ET.SubElement(
entry_el,
Expand Down
4 changes: 3 additions & 1 deletion tests/test_modules/test_ADCore/test_hdfwriterpart.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

expected_xml = (
'<?xml version="1.0" ?>\n'
'<hdf5_layout auto_ndattr_default="false">\n'
"<hdf5_layout>\n"
'<group name="entry">\n'
'<attribute name="NX_class" source="constant" type="string" value="NXentry" />\n'
'<group name="detector">\n'
Expand Down Expand Up @@ -343,6 +343,7 @@ def test_configure(self):
self.mock_xml_is_valid_check(self.o)
self.context.set_notify_dispatch_request(self.o.notify_dispatch_request)
actual_xml = self.configure_and_check_output()
assert actual_xml == expected_xml

actual_tree = ElementTree.XML(actual_xml)
expected_tree = ElementTree.XML(expected_xml)
Expand All @@ -367,6 +368,7 @@ def test_configure_windows(self):
self.mock_xml_is_valid_check(self.o)
self.context.set_notify_dispatch_request(self.o.notify_dispatch_request)
actual_xml = self.configure_and_check_output(on_windows=True)
assert actual_xml == expected_xml

actual_tree = ElementTree.XML(actual_xml)
expected_tree = ElementTree.XML(expected_xml)
Expand Down

0 comments on commit b989233

Please sign in to comment.