From 2be762dcd2f3bec16411361b86129531b5d1281a Mon Sep 17 00:00:00 2001 From: "T.Tian" Date: Thu, 25 Jan 2024 23:18:39 +0800 Subject: [PATCH] make tests independent of the sparc-x-api version --- tests/Socket_tests/Atom_sort_test/test_all.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/Socket_tests/Atom_sort_test/test_all.py b/tests/Socket_tests/Atom_sort_test/test_all.py index 472615f4..263ceee5 100644 --- a/tests/Socket_tests/Atom_sort_test/test_all.py +++ b/tests/Socket_tests/Atom_sort_test/test_all.py @@ -63,9 +63,8 @@ def sparc_socket(): atoms.calc = calc opt = BFGS(atoms, trajectory="sparc-socket.traj") opt.run(fmax=0.03) - images = read("h2o_test/", ":") - assert len(images) < 10 - return atoms.copy() + assert opt.get_number_of_steps() <= 10 # For the correct mesh spacing, opt should be very close + return def main():