mailr4956 - /branches/N_state_model/test_suite/unit_tests/_prompt/test_n_state_model.py


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

Header


Content

Posted by edward on February 12, 2008 - 14:47:
Author: bugman
Date: Tue Feb 12 14:47:53 2008
New Revision: 4956

URL: http://svn.gna.org/viewcvs/relax?rev=4956&view=rev
Log:
Wrote the pivot arg unit test for the n_state_model.pivot_point() user 
function.


Modified:
    branches/N_state_model/test_suite/unit_tests/_prompt/test_n_state_model.py

Modified: 
branches/N_state_model/test_suite/unit_tests/_prompt/test_n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/test_suite/unit_tests/_prompt/test_n_state_model.py?rev=4956&r1=4955&r2=4956&view=diff
==============================================================================
--- 
branches/N_state_model/test_suite/unit_tests/_prompt/test_n_state_model.py 
(original)
+++ 
branches/N_state_model/test_suite/unit_tests/_prompt/test_n_state_model.py 
Tue Feb 12 14:47:53 2008
@@ -25,7 +25,7 @@
 
 # relax module imports.
 from prompt.n_state_model import N_state_model
-from relax_errors import RelaxBoolError, RelaxIntError, RelaxStrError
+from relax_errors import RelaxBoolError, RelaxIntError, RelaxListError, 
RelaxStrError
 from test_suite.unit_tests.n_state_model_testing_base import 
N_state_model_base_class
 
 # Unit test imports.
@@ -64,6 +64,30 @@
 
             # The argument test.
             self.assertRaises(RelaxStrError, self.n_state_model_fns.model, 
N=5, ref=data[1])
+
+
+    def test_pivot_point_argfail_pivot(self):
+        """The pivot arg test of the pivot_point() user function."""
+
+        # Loop over the data types.
+        for data in DATA_TYPES:
+            # Catch the None arguments, and skip them.
+            if data[0] == 'None':
+                continue
+
+            # Catch the list arguments.
+            if type(data[1]) == list:
+                # Catch the int, float, and number list arguments, and skip 
them.
+                if data[0] == 'int list' or data[0] == 'float list' or 
data[0] == 'number list':
+                    self.assertRaises(RelaxLenError, 
self.n_state_model_fns.pivot_point, pivot=data[1])
+
+                # The argument test.
+                else:
+                    self.assertRaises(RelaxListNumError, 
self.n_state_model_fns.pivot_point, pivot=data[1])
+
+            # All other arguments.
+            else:
+                self.assertRaises(RelaxListError, 
self.n_state_model_fns.pivot_point, pivot=data[1])
 
 
     def test_set_domain_argfail_tensor(self):




Related Messages


Powered by MHonArc, Updated Tue Feb 12 15:00:50 2008