From 2d58a05522e773e0a6d3cb718ba9ddb8ec3193f3 Mon Sep 17 00:00:00 2001 From: domna Date: Thu, 22 Feb 2024 12:06:03 +0100 Subject: [PATCH] Only test for NXmpes --- tests/test_reader.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/test_reader.py b/tests/test_reader.py index e6949f9..f036282 100644 --- a/tests/test_reader.py +++ b/tests/test_reader.py @@ -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):