Skip to content

Commit

Permalink
Only test for NXmpes
Browse files Browse the repository at this point in the history
  • Loading branch information
domna committed Feb 22, 2024
1 parent 8470f4d commit 2d58a05
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,16 @@ def test_example_data():
str(data_dir / "xarray_saved_small_calibration.h5"),
)

for supported_nxdl in reader.supported_nxdls:
nxdl_file = os.path.join(
def_dir, "contributed_definitions", f"{supported_nxdl}.nxdl.xml"
)
nxdl_file = os.path.join(def_dir, "contributed_definitions", "NXmpes.nxdl.xml")

root = ET.parse(nxdl_file).getroot()
template = Template()
generate_template_from_nxdl(root, template)
root = ET.parse(nxdl_file).getroot()
template = Template()
generate_template_from_nxdl(root, template)

read_data = reader().read(template=Template(template), file_paths=input_files)
read_data = reader().read(template=Template(template), file_paths=input_files)

assert isinstance(read_data, Template)
assert validate_data_dict(template, read_data, root)
assert isinstance(read_data, Template)
assert validate_data_dict(template, read_data, root)


def test_mpes_writing(tmp_path):
Expand Down

0 comments on commit 2d58a05

Please sign in to comment.