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') + + +