Skip to content

Commit

Permalink
Fix comparison in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
t-reents committed Jan 24, 2025
1 parent 1a66123 commit 50e401d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/workflows/test_pdos.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from aiida.common import LinkType
from aiida.engine.utils import instantiate_process
from aiida.manage.manager import get_manager
import numpy as np
from plumpy import ProcessState
import pytest

Expand All @@ -33,10 +34,10 @@ def check_pdos_energy_range(dos_inputs, projwfc_inputs, expected_p_dos_inputs):
dos_params = dos_inputs.parameters.get_dict()
projwfc_params = projwfc_inputs.parameters.get_dict()

assert dos_params['DOS']['Emin'] == expected_p_dos_inputs[0]
assert dos_params['DOS']['Emax'] == expected_p_dos_inputs[1]
assert projwfc_params['PROJWFC']['Emin'] == expected_p_dos_inputs[0]
assert projwfc_params['PROJWFC']['Emax'] == expected_p_dos_inputs[1]
assert np.isclose(dos_params['DOS']['Emin'], expected_p_dos_inputs[0])
assert np.isclose(dos_params['DOS']['Emax'], expected_p_dos_inputs[1])
assert np.isclose(projwfc_params['PROJWFC']['Emin'], expected_p_dos_inputs[0])
assert np.isclose(projwfc_params['PROJWFC']['Emax'], expected_p_dos_inputs[1])


@pytest.mark.parametrize(
Expand Down

0 comments on commit 50e401d

Please sign in to comment.