mailr5025 - /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 19, 2008 - 16:39:
Author: bugman
Date: Tue Feb 19 16:39:14 2008
New Revision: 5025

URL: http://svn.gna.org/viewcvs/relax?rev=5025&view=rev
Log:
Wrote 4 arg unit tests for the n_state_model.cone_pdb() 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=5025&r1=5024&r2=5025&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 19 16:39:14 2008
@@ -25,7 +25,7 @@
 
 # relax module imports.
 from prompt.n_state_model import N_state_model
-from relax_errors import RelaxBoolError, RelaxIntError, RelaxLenError, 
RelaxListError, RelaxListNumError, RelaxStrError
+from relax_errors import RelaxBoolError, RelaxIntError, RelaxLenError, 
RelaxListError, RelaxListNumError, RelaxNoneStrError, RelaxNumError, 
RelaxStrError
 from test_suite.unit_tests.n_state_model_testing_base import 
N_state_model_base_class
 
 # Unit test imports.
@@ -92,6 +92,58 @@
                 self.assertRaises(RelaxListError, 
self.n_state_model_fns.CoM, centre=data[1])
 
 
+    def test_cone_pdb_argfail_scale(self):
+        """The scale arg test of the n_state_model.cone_pdb() user 
function."""
+
+        # Loop over the data types.
+        for data in DATA_TYPES:
+            # Catch the float, bin, and int arguments, and skip them.
+            if data[0] == 'float' or data[0] == 'bin' or data[0] == 'int':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxNumError, 
self.n_state_model_fns.cone_pdb, scale=data[1])
+
+
+    def test_cone_pdb_argfail_file(self):
+        """The file arg test of the n_state_model.cone_pdb() user 
function."""
+
+        # Loop over the data types.
+        for data in DATA_TYPES:
+            # Catch the str arguments, and skip them.
+            if data[0] == 'str':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxStrError, 
self.n_state_model_fns.cone_pdb, file=data[1])
+
+
+    def test_cone_pdb_argfail_dir(self):
+        """The dir arg test of the n_state_model.cone_pdb() user function."""
+
+        # Loop over the data types.
+        for data in DATA_TYPES:
+            # Catch the None and str arguments, and skip them.
+            if data[0] == 'None' or data[0] == 'str':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxNoneStrError, 
self.n_state_model_fns.cone_pdb, dir=data[1])
+
+
+    def test_cone_pdb_argfail_force(self):
+        """The force arg test of the n_state_model.cone_pdb() user 
function."""
+
+        # Loop over the data types.
+        for data in DATA_TYPES:
+            # Catch the bool arguments, and skip them.
+            if data[0] == 'bool':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxBoolError, 
self.n_state_model_fns.cone_pdb, force=data[1])
+
+
     def test_model_argfail_N(self):
         """Failure of the N arg of the n_state_model.model() user 
function."""
 




Related Messages


Powered by MHonArc, Updated Tue Feb 19 17:20:43 2008