mailr7554 - in /1.3/test_suite/system_tests: __init__.py noe.py


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

Header


Content

Posted by edward on October 07, 2008 - 21:37:
Author: bugman
Date: Tue Oct  7 21:37:24 2008
New Revision: 7554

URL: http://svn.gna.org/viewcvs/relax?rev=7554&view=rev
Log:
Activated the NOE analysis system test.


Added:
    1.3/test_suite/system_tests/noe.py
      - copied, changed from r7543, 1.3/test_suite/system_tests/relax_fit.py
Modified:
    1.3/test_suite/system_tests/__init__.py

Modified: 1.3/test_suite/system_tests/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/__init__.py?rev=7554&r1=7553&r2=7554&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/__init__.py (original)
+++ 1.3/test_suite/system_tests/__init__.py Tue Oct  7 21:37:24 2008
@@ -42,6 +42,7 @@
 from model_free import Mf
 from model_selection import Modsel
 from n_state_model import N_state_model
+from noe import Noe
 from nmrview import NMRView
 from palmer import Palmer
 from pipe_create import Pipe_create
@@ -63,6 +64,7 @@
            'model_free',
            'model_selection',
            'n_state_model',
+           'noe',
            'nmrview',
            'palmer',
            'pipe_create',
@@ -102,6 +104,7 @@
         suite_array.append(TestLoader().loadTestsFromTestCase(Mf))
         suite_array.append(TestLoader().loadTestsFromTestCase(Modsel))
         suite_array.append(TestLoader().loadTestsFromTestCase(N_state_model))
+        suite_array.append(TestLoader().loadTestsFromTestCase(Noe))
         suite_array.append(TestLoader().loadTestsFromTestCase(NMRView))
         suite_array.append(TestLoader().loadTestsFromTestCase(Palmer))
         suite_array.append(TestLoader().loadTestsFromTestCase(Pipe_create))

Copied: 1.3/test_suite/system_tests/noe.py (from r7543, 
1.3/test_suite/system_tests/relax_fit.py)
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/noe.py?p2=1.3/test_suite/system_tests/noe.py&p1=1.3/test_suite/system_tests/relax_fit.py&r1=7543&r2=7554&rev=7554&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/relax_fit.py (original)
+++ 1.3/test_suite/system_tests/noe.py Tue Oct  7 21:37:24 2008
@@ -26,18 +26,16 @@
 
 # relax module imports.
 from data import Relax_data_store; ds = Relax_data_store()
-from generic_fns.mol_res_spin import return_spin_from_index, spin_index_loop
-from generic_fns import pipes
 
 
-class Relax_fit(TestCase):
-    """Class for testing various aspects specific to relaxation 
curve-fitting."""
+class Noe(TestCase):
+    """Class for testing various aspects specific to the NOE analysis."""
 
     def setUp(self):
         """Set up for all the functional tests."""
 
         # Create the data pipe.
-        self.relax.interpreter._Pipe.create('mf', 'mf')
+        self.relax.interpreter._Pipe.create('noe', 'noe')
 
 
     def tearDown(self):
@@ -46,56 +44,8 @@
         ds.__reset__()
 
 
-    def test_curve_fitting(self):
-        """Test the relaxation curve fitting C modules."""
+    def test_noe_analysis(self):
+        """Test the NOE analysis."""
 
         # Execute the script.
-        self.relax.interpreter.run(script_file=sys.path[-1] + 
'/test_suite/system_tests/scripts/relax_fit.py')
-
-
-    def test_read_sparky(self):
-        """The Sparky peak height loading test."""
-
-        # Load the original state.
-        self.relax.interpreter._State.load(state='basic_heights_T2_ncyc1', 
dir_name=sys.path[-1] + '/test_suite/shared_data/saved_states')
-
-        # Create a new data pipe for the new data.
-        self.relax.interpreter._Pipe.create('new', 'relax_fit')
-
-        # 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)
-
-
-        # Test the integrity of the data.
-        #################################
-
-        # Get the data pipes.
-        dp_new = pipes.get_pipe('new')
-        dp_rx = pipes.get_pipe('rx')
-
-        # Loop over the spins of the original data.
-        for mol_index, res_index, spin_index in spin_index_loop():
-            # Alias the spin containers.
-            new_spin = dp_new.mol[mol_index].res[res_index].spin[spin_index]
-            orig_spin = dp_rx.mol[mol_index].res[res_index].spin[spin_index]
-
-            # Check the sequence info.
-            self.assertEqual(dp_new.mol[mol_index].name, 
dp_rx.mol[mol_index].name)
-            self.assertEqual(dp_new.mol[mol_index].res[res_index].num, 
dp_rx.mol[mol_index].res[res_index].num)
-            self.assertEqual(dp_new.mol[mol_index].res[res_index].name, 
dp_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 (if they exist).
-            if hasattr(orig_spin, 'intensities'):
-                self.assertEqual(orig_spin.intensities[0][0], 
new_spin.intensities[0][0])
+        self.relax.interpreter.run(script_file=sys.path[-1] + 
'/test_suite/system_tests/scripts/noe.py')




Related Messages


Powered by MHonArc, Updated Tue Oct 07 21:40:03 2008