mailr22312 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py


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

Header


Content

Posted by tlinnet on February 25, 2014 - 16:39:
Author: tlinnet
Date: Tue Feb 25 16:39:32 2014
New Revision: 22312

URL: http://svn.gna.org/viewcvs/relax?rev=22312&view=rev
Log:
Moved the unit test get_times() to its own test.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Modified:
    
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

Modified: 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22312&r1=22311&r2=22312&view=diff
==============================================================================
--- 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
(original)
+++ 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
Tue Feb 25 16:39:32 2014
@@ -82,21 +82,32 @@
             # Test the time count
             self.assertEqual(count, 1)
 
+        # Check the return of get_curve_type function.
+        curve_type = get_curve_type()
+        print(curve_type)
+        self.assertEqual(curve_type, 'fixed time')
+
+        # Check the return of has_exponential_exp_type.
+        exponential_exp_type = has_exponential_exp_type()
+        print(exponential_exp_type)
+        self.assertEqual(exponential_exp_type, False)
+
+
+    def test_get_times(self):
+        """Unit test of the get_times() function.
+
+        This uses the data of the saved state attached to U{bug 
#21665<https://gna.org/bugs/?21665>}.
+        """
+
+        # Load the state.
+        statefile = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21665.bz2'
+        state.load_state(statefile, force=True)
+
         # Check the return of get_times().
         times = get_times()
         for exp_type in times:
             print(times[exp_type])
             self.assertEqual(len(times[exp_type]), 2)
-
-        # Check the return of get_curve_type function.
-        curve_type = get_curve_type()
-        print(curve_type)
-        self.assertEqual(curve_type, 'fixed time')
-
-        # Check the return of has_exponential_exp_type.
-        exponential_exp_type = has_exponential_exp_type()
-        print(exponential_exp_type)
-        self.assertEqual(exponential_exp_type, False)
 
 
     def test_loop_exp_frq(self):




Related Messages


Powered by MHonArc, Updated Tue Feb 25 16:40:02 2014