From 10fa443b7f393c86dbdfe32cd8d0da19ccf3dd07 Mon Sep 17 00:00:00 2001 From: Jimmy Shen <14003693+jmmshn@users.noreply.github.com> Date: Tue, 5 Mar 2024 21:45:15 -0800 Subject: [PATCH] fixed tests (#765) --- tests/forcefields/test_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/forcefields/test_utils.py b/tests/forcefields/test_utils.py index 9856b881d4..4c16faa43e 100644 --- a/tests/forcefields/test_utils.py +++ b/tests/forcefields/test_utils.py @@ -111,9 +111,11 @@ def test_relaxer(si_structure, test_dir, tmp_dir, optimizer, traj_file): assert relax_output["trajectory"].energies[-1] == pytest.approx(expected_energy) - assert_allclose(relax_output["trajectory"].forces[-1], expected_forces) + assert_allclose(relax_output["trajectory"].forces[-1], expected_forces, atol=1e-8) - assert_allclose(relax_output["trajectory"].stresses[-1], expected_stresses) + assert_allclose( + relax_output["trajectory"].stresses[-1], expected_stresses, atol=1e-8 + ) if traj_file: assert os.path.isfile(traj_file)