mailr3443 - /1.3/test_suite/unit_tests/generic_fns/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 04, 2007 - 19:41:
Author: bugman
Date: Sun Nov  4 19:41:53 2007
New Revision: 3443

URL: http://svn.gna.org/viewcvs/relax?rev=3443&view=rev
Log:
Added a unit test for the generic_fns.molecule.rename() function.


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

Modified: 1.3/test_suite/unit_tests/generic_fns/test_molecule.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/generic_fns/test_molecule.py?rev=3443&r1=3442&r2=3443&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/generic_fns/test_molecule.py (original)
+++ 1.3/test_suite/unit_tests/generic_fns/test_molecule.py Sun Nov  4 
19:41:53 2007
@@ -320,3 +320,20 @@
         self.assertRaises(RelaxResSelectDisallowError, molecule.display, 
':1')
 
 
+    def test_rename(self):
+        """Test the renaming of a molecule.
+
+        The function tested is generic_fns.molecule.rename().
+        """
+
+        # Set up some data.
+        self.setup_data()
+
+        # Rename the molecule.
+        molecule.rename(mol_id='#New mol', new_name='K')
+
+        # Test that the molecule has been renamed.
+        self.assertEqual(relax_data_store['orig'].mol[1].name, 'K')
+
+
+




Related Messages


Powered by MHonArc, Updated Sun Nov 04 20:00:23 2007