Skip to content

Commit

Permalink
remove del method; fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ka-sarthak committed Jan 15, 2025
1 parent 369dc72 commit aa0277c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 0 additions & 4 deletions src/nomad_measurements/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,6 @@ def _set_hdf5_reference(
):
resolved_section.m_set(quantity_name, ref)

def __del__(self):
if self._hdf5_datasets or self._hdf5_attributes:
self.write_file()


def resolve_path(section: 'ArchiveSection', path: str, logger: 'BoundLogger' = None):
"""
Expand Down
3 changes: 2 additions & 1 deletion tests/test_xrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#
import pytest
from nomad.client import normalize_all
from nomad_measurements.xrd.schema import XRDResult1D

test_files = [
'tests/data/xrd/XRD-918-16_10.xrdml',
Expand Down Expand Up @@ -52,7 +53,7 @@ def test_normalize_all(parsed_measurement_archive, caplog):
assert parsed_measurement_archive.data.results[
0
].source_peak_wavelength.magnitude == pytest.approx(1.540598, 1e-2)
if len(parsed_measurement_archive.data.results[0].intensity.shape) == 1:
if isinstance(parsed_measurement_archive.data.results[0], XRDResult1D):
assert (
parsed_measurement_archive.results.properties.structural.diffraction_pattern[
0
Expand Down

0 comments on commit aa0277c

Please sign in to comment.