mailr8665 - /branches/ave_noe/test_suite/unit_tests/_prompt/test_spin.py


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

Header


Content

Posted by edward on January 27, 2009 - 13:55:
Author: bugman
Date: Tue Jan 27 13:55:57 2009
New Revision: 8665

URL: http://svn.gna.org/viewcvs/relax?rev=8665&view=rev
Log:
Wrote 5 arg unit tests for the spin.create_pseudo() user function.


Modified:
    branches/ave_noe/test_suite/unit_tests/_prompt/test_spin.py

Modified: branches/ave_noe/test_suite/unit_tests/_prompt/test_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/ave_noe/test_suite/unit_tests/_prompt/test_spin.py?rev=8665&r1=8664&r2=8665&view=diff
==============================================================================
--- branches/ave_noe/test_suite/unit_tests/_prompt/test_spin.py (original)
+++ branches/ave_noe/test_suite/unit_tests/_prompt/test_spin.py Tue Jan 27 
13:55:57 2009
@@ -131,6 +131,71 @@
             self.assertRaises(RelaxNoneStrError, self.spin_fns.create, 
res_id=data[1], spin_num=1, spin_name='NH')
 
 
+    def test_create_pseudo_argfail_spin_name(self):
+        """The spin_name arg test of the spin.create_pseudo() user 
function."""
+
+        # Loop over the data types.
+        for data in DATA_TYPES:
+            # Catch the None and str arguments, and skip them.
+            if data[0] == 'str':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxStrError, self.spin_fns.create_pseudo, 
spin_name=data[1])
+
+
+    def test_create_pseudo_argfail_spin_num(self):
+        """The spin_num arg test of the spin.create_pseudo() user 
function."""
+
+        # Loop over the data types.
+        for data in DATA_TYPES:
+            # Catch the int and bin arguments, and skip them.
+            if data[0] == 'None' or data[0] == 'int' or data[0] == 'bin':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxNoneIntError, 
self.spin_fns.create_pseudo, spin_num=data[1], spin_name='Q')
+
+
+    def test_create_pseudo_argfail_res_id(self):
+        """The res_id arg test of the spin.create_pseudo() 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.spin_fns.create_pseudo, res_id=data[1], spin_name='Q')
+
+
+    def test_create_pseudo_argfail_members(self):
+        """The members arg test of the spin.create_pseudo() user function."""
+
+        # Loop over the data types.
+        for data in DATA_TYPES:
+            # Catch the str list argument, and skip it.
+            if data[0] == 'str list':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxListStrError, 
self.spin_fns.create_pseudo, members=data[1], spin_name='Q')
+
+
+    def test_create_pseudo_argfail_averaging(self):
+        """The averaging arg test of the spin.create_pseudo() 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.spin_fns.create_pseudo, averaging=data[1], spin_name='Q')
+
+
     def test_delete_argfail_spin_id(self):
         """Test the proper failure of the spin.delete() user function for 
the spin_id argument."""
 




Related Messages


Powered by MHonArc, Updated Tue Jan 27 14:20:04 2009