mailr6262 - /1.3/test_suite/system_tests/relax_fit.py


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

Header


Content

Posted by edward on May 22, 2008 - 18:07:
Author: bugman
Date: Thu May 22 17:52:35 2008
New Revision: 6262

URL: http://svn.gna.org/viewcvs/relax?rev=6262&view=rev
Log:
Fixed the test_read_sparky system test.


Modified:
    1.3/test_suite/system_tests/relax_fit.py

Modified: 1.3/test_suite/system_tests/relax_fit.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/relax_fit.py?rev=6262&r1=6261&r2=6262&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/relax_fit.py (original)
+++ 1.3/test_suite/system_tests/relax_fit.py Thu May 22 17:52:35 2008
@@ -64,6 +64,9 @@
         # Load the Lupin Ap4Aase sequence.
         self.relax.interpreter._Sequence.read(file="Ap4Aase.seq", 
dir=sys.path[-1] + "/test_suite/system_tests/data")
 
+        # Name the spins so they can be matched to the assignments.
+        self.relax.interpreter._Spin.name(name='N')
+
         # Read the peak heights.
         self.relax.interpreter._Relax_fit.read(file="T2_ncyc1_ave.list", 
dir=sys.path[-1] + "/test_suite/shared_data/curve_fitting", relax_time=0.0176)
 
@@ -72,17 +75,22 @@
         #################################
 
         # Loop over the spins of the original data.
-        for index in spin_index_loop():
-            # Get the spins from both pipes.
-            orig_spin, orig_id = return_spin_from_index(index, pipe='rx', 
return_spin_id=True)
-            new_spin, new_id = return_spin_from_index(index, 
return_spin_id=True)
+        for mol_index, res_index, spin_index in spin_index_loop():
+            # Alias the spin containers.
+            new_spin = 
ds['new'].mol[mol_index].res[res_index].spin[spin_index]
+            orig_spin = 
ds['rx'].mol[mol_index].res[res_index].spin[spin_index]
 
-            # Check spin ids.
-            self.assertEqual(orig_id, new_id)
+            # Check the sequence info.
+            self.assertEqual(ds['new'].mol[mol_index].name, 
ds['rx'].mol[mol_index].name)
+            self.assertEqual(ds['new'].mol[mol_index].res[res_index].num, 
ds['rx'].mol[mol_index].res[res_index].num)
+            self.assertEqual(ds['new'].mol[mol_index].res[res_index].name, 
ds['rx'].mol[mol_index].res[res_index].name)
+            self.assertEqual(new_spin.num, orig_spin.num)
+            self.assertEqual(new_spin.name, orig_spin.name)
 
             # Skip deselected spins.
             if not orig_spin.select:
                 continue
 
-            # Check intensities.
-            self.assertEqual(orig_spin.intensities[0][0], 
new_spin.intensities[0][0])
+            # Check intensities (if they exist).
+            if hasattr(orig_spin, 'intensities'):
+                self.assertEqual(orig_spin.intensities[0][0], 
new_spin.intensities[0][0])




Related Messages


Powered by MHonArc, Updated Thu May 22 18:20:14 2008