From 992d851d2136d99c4875df0a3c048594a0c08233 Mon Sep 17 00:00:00 2001 From: jrudz Date: Tue, 7 Nov 2023 10:30:37 +0100 Subject: [PATCH] fixed other random broken tests --- tests/test_bopfoxparser.py | 6 +++--- tests/test_dlpolyparser.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_bopfoxparser.py b/tests/test_bopfoxparser.py index 52c2f4d6..9ee02e91 100644 --- a/tests/test_bopfoxparser.py +++ b/tests/test_bopfoxparser.py @@ -44,14 +44,14 @@ def test_energy(parser): sec_model = sec_method.tb.model[0] assert sec_model.name == 'test' assert sec_model.hamiltonian[0].name == 'ddsigma' - assert sec_model.hamiltonian[1].atom_labels == ['W', 'W'] + assert (sec_model.hamiltonian[1].atom_labels == ['W', 'W']).all() assert sec_model.hamiltonian[2].functional_form == 'screenedpowerlaw' assert sec_model.hamiltonian[3].x_bopfox_cutoff == approx(4.4) assert sec_model.hamiltonian[4].x_bopfox_dcutoff == approx(1.3) assert sec_model.hamiltonian[5].x_bopfox_valence == ['d', 'd'] - assert sec_model.hamiltonian[6].atom_labels == ['W', 'Mo'] + assert (sec_model.hamiltonian[6].atom_labels == ['W', 'Mo']).all() assert sec_model.hamiltonian[7].parameters[0] == approx(0.8359765) - assert sec_model.repulsion[2].atom_labels == ['Mo', 'Mo'] + assert (sec_model.repulsion[2].atom_labels == ['Mo', 'Mo']).all() assert sec_model.repulsion[0].x_bopfox_cutoff == approx(5.0) assert sec_model.repulsion[1].parameters[2] == approx(-2.909290858) assert sec_model.repulsion[2].functional_form == 'env_Yukawa' diff --git a/tests/test_dlpolyparser.py b/tests/test_dlpolyparser.py index 04fd154d..9a4265cb 100644 --- a/tests/test_dlpolyparser.py +++ b/tests/test_dlpolyparser.py @@ -50,7 +50,7 @@ def test_0(parser): assert sec_atom_parameters[0].x_dl_poly_nrept == 500 sec_model = sec_method.force_field.model[0] assert len(sec_model.contributions) == 3 - assert sec_model.contributions[0].atom_labels == ['Na+', 'Na+'] + assert (sec_model.contributions[0].atom_labels == ['Na+', 'Na+']).all() assert sec_model.contributions[1].functional_form == 'Born-Huggins-Meyer' assert sec_model.contributions[2].parameters[1] == approx(3.1545) @@ -91,7 +91,7 @@ def test_1(parser): sec_model = archive.run[0].method[0].force_field.model[0] assert len(sec_model.contributions) == 1 - assert sec_model.contributions[0].atom_labels == ['Al', 'Al'] + assert (sec_model.contributions[0].atom_labels == ['Al', 'Al']).all() assert sec_model.contributions[0].functional_form == 'Sutton-Chen' assert sec_model.contributions[0].parameters[4] == approx(16.399)