From 26c0a10484b2f0170a61167cbfd5d9ba42ec7aa4 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Tue, 23 Apr 2024 17:03:44 -0500 Subject: [PATCH] Update test_ase_interface.py --- tests/test_ase_interface.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_ase_interface.py b/tests/test_ase_interface.py index a069fc6..4946a9d 100644 --- a/tests/test_ase_interface.py +++ b/tests/test_ase_interface.py @@ -138,10 +138,10 @@ def test_unfolding_prism_cubic(self): def test_unfolding_prism_skewed(self): prism = UnfoldingPrism(self.structure_skewed.cell.array) - self.assertEqual( - prism.get_lammps_prism_str(), - ('5.7275649276', '4.9602167291', '4.6765371804', '2.8637824638', '2.8637824638', '1.6534055764') - ) + self.assertTrue(np.all(np.isclose( + [np.abs(float(s)) for s in prism.get_lammps_prism_str()], + [5.7275649276, 4.9602167291, 4.6765371804, 2.8637824638, 2.8637824638, 1.6534055764] + ))) self.assertTrue(np.all(np.isclose(prism.pos_to_lammps(position=[[1.0, 1.0, 1.0]]), np.array([1.41421356, 0.81649658, 0.57735027])))) @@ -206,4 +206,4 @@ def test_selective_dynamics_wrong_plane(self): [2, 1, 0], )) with self.assertRaises(ValueError): - set_selective_dynamics(structure=atoms, calc_md=False) \ No newline at end of file + set_selective_dynamics(structure=atoms, calc_md=False)