mailr3634 - /1.3/test_suite/unit_tests/prompt/test_molecule.py


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

Header


Content

Posted by edward on November 20, 2007 - 11:03:
Author: bugman
Date: Tue Nov 20 11:03:28 2007
New Revision: 3634

URL: http://svn.gna.org/viewcvs/relax?rev=3634&view=rev
Log:
Implemented the mol_name arg unit test for the molecule.create() user 
function.


Modified:
    1.3/test_suite/unit_tests/prompt/test_molecule.py

Modified: 1.3/test_suite/unit_tests/prompt/test_molecule.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/prompt/test_molecule.py?rev=3634&r1=3633&r2=3634&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/prompt/test_molecule.py (original)
+++ 1.3/test_suite/unit_tests/prompt/test_molecule.py Tue Nov 20 11:03:28 2007
@@ -104,8 +104,86 @@
             self.assertRaises(RelaxStrError, self.molecule_fns.copy, 
mol_from='#Old mol', mol_to=data[1])
 
 
-    def test_create_argfail_spin_num(self):
-        """Test the proper failure of the spin.create() user function for 
the spin_num argument."""
+    def test_create_argfail_mol_name(self):
+        """Test the proper failure of the molecule.create() user function 
for the mol_name argument."""
+
+        # Loop over the data types.
+        for data in return_data_types():
+            # Catch the str arguments, and skip them.
+            if data[0] == 'str':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxStrError, self.molecule_fns.create, 
mol_name=data[1])
+
+
+    def test_delete_argfail_spin_id(self):
+        """Test the proper failure of the spin.delete() user function for 
the spin_id argument."""
+
+        # Loop over the data types.
+        for data in return_data_types():
+            # Catch the str arguments, and skip them.
+            if data[0] == 'str':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxStrError, self.spin_fns.delete, 
spin_id=data[1])
+
+
+    def test_display_argfail_spin_id(self):
+        """Test the proper failure of the spin.display() user function for 
the spin_id argument."""
+
+        # Loop over the data types.
+        for data in return_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.display, 
spin_id=data[1])
+
+
+    def test_rename_argfail_spin_id(self):
+        """Test the proper failure of the spin.rename() user function for 
the spin_id argument."""
+
+        # Loop over the data types.
+        for data in return_data_types():
+            # Catch the str arguments, and skip them.
+            if data[0] == 'str':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxStrError, self.spin_fns.rename, 
spin_id=data[1])
+
+
+    def test_rename_argfail_new_name(self):
+        """Test the proper failure of the spin.rename() user function for 
the new_name argument."""
+
+        # Loop over the data types.
+        for data in return_data_types():
+            # Catch the str arguments, and skip them.
+            if data[0] == 'str':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxStrError, self.spin_fns.rename, 
new_name=data[1])
+
+
+    def test_renumber_argfail_spin_id(self):
+        """Test the proper failure of the spin.renumber() user function for 
the spin_id argument."""
+
+        # Loop over the data types.
+        for data in return_data_types():
+            # Catch the str arguments, and skip them.
+            if data[0] == 'str':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxStrError, self.spin_fns.renumber, 
spin_id=data[1])
+
+
+    def test_renumber_argfail_new_name(self):
+        """Test the proper failure of the spin.renumber() user function for 
the new_number argument."""
 
         # Loop over the data types.
         for data in return_data_types():
@@ -114,110 +192,6 @@
                 continue
 
             # The argument test.
-            self.assertRaises(RelaxIntError, self.spin_fns.create, 
spin_num=data[1], spin_name='NH')
-
-
-    def test_create_argfail_spin_name(self):
-        """Test the proper failure of the spin.create() user function for 
the spin_name argument."""
-
-        # Loop over the data types.
-        for data in return_data_types():
-            # Catch the str arguments, and skip them.
-            if data[0] == 'str':
-                continue
-
-            # The argument test.
-            self.assertRaises(RelaxStrError, self.spin_fns.create, 
spin_name=data[1], spin_num=1)
-
-
-    def test_create_argfail_res_id(self):
-        """Test the proper failure of the spin.create() user function for 
the res_id argument."""
-
-        # Loop over the data types.
-        for data in return_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, 
res_id=data[1], spin_num=1, spin_name='NH')
-
-
-    def test_delete_argfail_spin_id(self):
-        """Test the proper failure of the spin.delete() user function for 
the spin_id argument."""
-
-        # Loop over the data types.
-        for data in return_data_types():
-            # Catch the str arguments, and skip them.
-            if data[0] == 'str':
-                continue
-
-            # The argument test.
-            self.assertRaises(RelaxStrError, self.spin_fns.delete, 
spin_id=data[1])
-
-
-    def test_display_argfail_spin_id(self):
-        """Test the proper failure of the spin.display() user function for 
the spin_id argument."""
-
-        # Loop over the data types.
-        for data in return_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.display, 
spin_id=data[1])
-
-
-    def test_rename_argfail_spin_id(self):
-        """Test the proper failure of the spin.rename() user function for 
the spin_id argument."""
-
-        # Loop over the data types.
-        for data in return_data_types():
-            # Catch the str arguments, and skip them.
-            if data[0] == 'str':
-                continue
-
-            # The argument test.
-            self.assertRaises(RelaxStrError, self.spin_fns.rename, 
spin_id=data[1])
-
-
-    def test_rename_argfail_new_name(self):
-        """Test the proper failure of the spin.rename() user function for 
the new_name argument."""
-
-        # Loop over the data types.
-        for data in return_data_types():
-            # Catch the str arguments, and skip them.
-            if data[0] == 'str':
-                continue
-
-            # The argument test.
-            self.assertRaises(RelaxStrError, self.spin_fns.rename, 
new_name=data[1])
-
-
-    def test_renumber_argfail_spin_id(self):
-        """Test the proper failure of the spin.renumber() user function for 
the spin_id argument."""
-
-        # Loop over the data types.
-        for data in return_data_types():
-            # Catch the str arguments, and skip them.
-            if data[0] == 'str':
-                continue
-
-            # The argument test.
-            self.assertRaises(RelaxStrError, self.spin_fns.renumber, 
spin_id=data[1])
-
-
-    def test_renumber_argfail_new_name(self):
-        """Test the proper failure of the spin.renumber() user function for 
the new_number argument."""
-
-        # Loop over the data types.
-        for data in return_data_types():
-            # Catch the int and bin arguments, and skip them.
-            if data[0] == 'int' or data[0] == 'bin':
-                continue
-
-            # The argument test.
             self.assertRaises(RelaxIntError, self.spin_fns.renumber, 
spin_id='@111', new_number=data[1])
 
 




Related Messages


Powered by MHonArc, Updated Tue Nov 20 11:20:13 2007