mailr4570 - /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 January 09, 2008 - 17:58:
Author: bugman
Date: Wed Jan  9 17:58:12 2008
New Revision: 4570

URL: http://svn.gna.org/viewcvs/relax?rev=4570&view=rev
Log:
Wrote 2 unit tests for the arguments of the n_state_model.set_type() 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=4570&r1=4569&r2=4570&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 
Wed Jan  9 17:58:12 2008
@@ -25,7 +25,7 @@
 
 # relax module imports.
 from prompt.n_state_model import N_state_model
-from relax_errors import RelaxStrError
+from relax_errors import RelaxBoolError, RelaxStrError
 from test_suite.unit_tests.n_state_model_testing_base import 
N_state_model_base_class
 
 # Unit test imports.
@@ -66,3 +66,29 @@
             self.assertRaises(RelaxStrError, 
self.n_state_model_fns.set_domain, domain=data[1])
 
 
+    def test_set_type_argfail_tensor(self):
+        """Failure of the tensor arg of the n_state_model.set_type() 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.n_state_model_fns.set_type, tensor=data[1])
+
+
+    def test_set_type_argfail_red(self):
+        """Failure of the red arg of the n_state_model.set_type() user 
function."""
+
+        # Loop over the data types.
+        for data in DATA_TYPES:
+            # Catch the bool argument, and skip it.
+            if data[0] == 'bool':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxBoolError, 
self.n_state_model_fns.set_type, red=data[1])
+
+




Related Messages


Powered by MHonArc, Updated Wed Jan 09 18:20:18 2008