From e85958f7ae05d6b21612b29c712f6264e05e5fcd Mon Sep 17 00:00:00 2001 From: "nathan.daelman@physik.hu-berlin.de" Date: Mon, 28 Oct 2024 14:15:59 +0100 Subject: [PATCH] Convert ocean test update to NOMAD section interface --- tests/test_oceanparser.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_oceanparser.py b/tests/test_oceanparser.py index b1471168..b0fd2889 100644 --- a/tests/test_oceanparser.py +++ b/tests/test_oceanparser.py @@ -18,7 +18,6 @@ import pytest import numpy as np -import re from nomad.datamodel import EntryArchive from electronicparsers.ocean import OceanParser @@ -65,9 +64,8 @@ def test_tio2(parser): assert sec_bse.core_hole.broadening.to('eV').magnitude == approx(0.89) sec_ocean_screen = sec_method[-1].x_ocean_screen - for screen_param in vars(x_ocean_screen_parameters).keys(): - if re.match('x_ocean_', screen_param): - assert getattr(sec_ocean_screen, screen_param) is not None + for screen_param in x_ocean_screen_parameters.m_def.quantities: + assert sec_ocean_screen.m_is_set(screen_param) assert sec_ocean_screen.x_ocean_dft_energy_range == approx(150.0) # Calculation