mailr3999 - /branches/N_state_model/test_suite/unit_tests/_prompt/test_align_tensor.py


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

Header


Content

Posted by edward on November 26, 2007 - 13:28:
Author: bugman
Date: Mon Nov 26 12:37:08 2007
New Revision: 3999

URL: http://svn.gna.org/viewcvs/relax?rev=3999&view=rev
Log:
Wrote 2 unit tests for the scale and angle_units args to the 
align_tensor.init() user function.


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

Modified: 
branches/N_state_model/test_suite/unit_tests/_prompt/test_align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/test_suite/unit_tests/_prompt/test_align_tensor.py?rev=3999&r1=3998&r2=3999&view=diff
==============================================================================
--- branches/N_state_model/test_suite/unit_tests/_prompt/test_align_tensor.py 
(original)
+++ branches/N_state_model/test_suite/unit_tests/_prompt/test_align_tensor.py 
Mon Nov 26 12:37:08 2007
@@ -25,7 +25,7 @@
 
 # relax module imports.
 from prompt.align_tensor import Align_tensor
-from relax_errors import RelaxError, RelaxBinError, RelaxIntError, 
RelaxNoneStrError, RelaxNumTupleError
+from relax_errors import RelaxError, RelaxBinError, RelaxFloatError, 
RelaxIntError, RelaxNoneStrError, RelaxNumTupleError, RelaxStrError
 from test_suite.unit_tests.align_tensor_testing_base import 
Align_tensor_base_class
 
 # Unit test imports.
@@ -93,6 +93,32 @@
                 self.assertRaises(RelaxNumTupleError, 
self.align_tensor_fns.init, params=data[1])
 
 
+    def test_init_argfail_scale(self):
+        """The scale arg test of the align_tensor.init() user function."""
+
+        # Loop over the data types.
+        for data in DATA_TYPES:
+            # Catch the float argument, and skip it.
+            if data[0] == 'float':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxFloatError, self.align_tensor_fns.init, 
params=(0.0, 0.0, 0.0, 0.0, 0.0), scale=data[1])
+
+
+    def test_init_argfail_angle_units(self):
+        """The angle_units arg test of the align_tensor.init() user 
function."""
+
+        # Loop over the data types.
+        for data in DATA_TYPES:
+            # Catch the str argument, and skip it.
+            if data[0] == 'str':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxStrError, self.align_tensor_fns.init, 
params=(0.0, 0.0, 0.0, 0.0, 0.0), angle_units=data[1])
+
+
     def test_init_argfail_param_types(self):
         """The proper failure of the align_tensor.init() user function for 
the param_types argument."""
 




Related Messages


Powered by MHonArc, Updated Mon Nov 26 13:40:11 2007