mailr8192 - in /1.3/test_suite/unit_tests/_generic_fns/_structure: test_internal.py test_scientific.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on December 11, 2008 - 17:48:
Author: bugman
Date: Thu Dec 11 17:48:43 2008
New Revision: 8192

URL: http://svn.gna.org/viewcvs/relax?rev=8192&view=rev
Log:
Fixes for the 2 test_atom_loop_spin_selection2() unit tests.

This problem was reported by Jack Howarth (https://gna.org/users/jhowarth) in 
the post at
https://mail.gna.org/public/relax-users/2008-10/msg00089.html (Message-id:
<20081024141150.GA879@xxxxxxxxxxxxxxxxx>).

The problem was with the position array comparison as this was being 
converted to a string and then
compared.  The string representations of the numpy arrays is obviously 
different on the intel vs.
powerpc chips.


Modified:
    1.3/test_suite/unit_tests/_generic_fns/_structure/test_internal.py
    1.3/test_suite/unit_tests/_generic_fns/_structure/test_scientific.py

Modified: 1.3/test_suite/unit_tests/_generic_fns/_structure/test_internal.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_generic_fns/_structure/test_internal.py?rev=8192&r1=8191&r2=8192&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_generic_fns/_structure/test_internal.py 
(original)
+++ 1.3/test_suite/unit_tests/_generic_fns/_structure/test_internal.py Thu 
Dec 11 17:48:43 2008
@@ -194,7 +194,9 @@
             self.assertEqual(spin_num, 163)
             self.assertEqual(spin_name, 'OE1')
             self.assertEqual(element, 'O')
-            self.assertEqual(pos.tostring(), 
'\\\x8f\xc2\xf5(\x1c$@\xecQ\xb8\x1e\x85\xeb\x05\xc0\x89A`\xe5\xd0b*\xc0')
+            self.assertEqual(pos[0], float('10.055'))
+            self.assertEqual(pos[1], float('-2.74'))
+            self.assertEqual(pos[2], float('-13.193'))
 
             # Increment the atom count.
             atom_count = atom_count + 1

Modified: 1.3/test_suite/unit_tests/_generic_fns/_structure/test_scientific.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_generic_fns/_structure/test_scientific.py?rev=8192&r1=8191&r2=8192&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_generic_fns/_structure/test_scientific.py 
(original)
+++ 1.3/test_suite/unit_tests/_generic_fns/_structure/test_scientific.py Thu 
Dec 11 17:48:43 2008
@@ -294,7 +294,9 @@
             self.assertEqual(spin_num, 163)
             self.assertEqual(spin_name, 'OE1')
             self.assertEqual(element, 'O')
-            self.assertEqual(pos.tostring(), 
'\\\x8f\xc2\xf5(\x1c$@\xecQ\xb8\x1e\x85\xeb\x05\xc0\x89A`\xe5\xd0b*\xc0')
+            self.assertEqual(pos[0], float('10.055'))
+            self.assertEqual(pos[1], float('-2.74'))
+            self.assertEqual(pos[2], float('-13.193'))
 
             # Increment the atom count.
             atom_count = atom_count + 1




Related Messages


Powered by MHonArc, Updated Thu Dec 11 18:20:02 2008