From 2f30c4e1056e5c30b138fd6be2c696cbc857ba19 Mon Sep 17 00:00:00 2001 From: James Krieger Date: Sun, 5 Nov 2023 13:06:54 +0100 Subject: [PATCH] fix allclose anisous with dimensions --- prody/tests/proteins/test_pdbfile.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/prody/tests/proteins/test_pdbfile.py b/prody/tests/proteins/test_pdbfile.py index 790c723d8..e1431780d 100644 --- a/prody/tests/proteins/test_pdbfile.py +++ b/prody/tests/proteins/test_pdbfile.py @@ -207,11 +207,11 @@ def testAltlocAllToMultiAtoms(self): self.assertEqual(hisB234.getAnisous().shape, (self.altlocs['num_altlocs'], 6), 'parsePDB failed to have right shape for His B234 CA atoms getAnisous (2, 6) with altloc "all"') - self.assertEqual(hisB234.getAnisous()[0][0], self.altlocs['anisousA'][0], - 'parsePDB failed to have right His B234 CA atoms getAnisous A with altloc "all"') + assert_allclose(hisB234.getAnisous()[0], self.altlocs['anisousA'][0], + err_msg='parsePDB failed to have right His B234 CA atoms getAnisous A with altloc "all"') - self.assertEqual(hisB234.getAnisous()[1][0], self.altlocs['anisousB'][0], - 'parsePDB failed to have right His B234 CA atoms getAnisous B with altloc "all"') + assert_allclose(hisB234.getAnisous()[1], self.altlocs['anisousB'][0], + err_msg='parsePDB failed to have right His B234 CA atoms getAnisous B with altloc "all"') def testAltlocNoneToMultiCoordets(self): """Test number of coordinate sets and atoms with altloc=None.""" @@ -231,13 +231,13 @@ def testAltlocNoneToMultiCoordets(self): self.assertEqual(hisB234.getAnisous().shape, (1, 6), 'parsePDB failed to have right shape for His B234 CA atoms getAnisous (1, 6) with altloc None') - self.assertEqual(hisB234.getAnisous()[0], self.altlocs['anisousA'][0], - 'parsePDB failed to have right His B234 CA atoms getAnisous A with altloc None') + assert_allclose(hisB234.getAnisous(), self.altlocs['anisousA'], + err_msg='parsePDB failed to have right His B234 CA atoms getAnisous A with altloc None') hisB234.setACSIndex(1) - self.assertEqual(hisB234.getAnisous()[0], self.altlocs['anisousB'][0], - 'parsePDB failed to have right His B234 CA atoms getAnisous B with altloc None') + assert_allclose(hisB234.getAnisous(), self.altlocs['anisousB'], + err_msg='parsePDB failed to have right His B234 CA atoms getAnisous B with altloc None') ''' def testBiomolArgument(self):