Author: bugman Date: Sun Nov 4 19:20:18 2007 New Revision: 3434 URL: http://svn.gna.org/viewcvs/relax?rev=3434&view=rev Log: Added 2 unit tests for the generic_fns.molecule.display() 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=3434&r1=3433&r2=3434&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:20:18 2007 @@ -291,4 +291,32 @@ self.assertRaises(RelaxResSelectDisallowError, molecule.delete, mol_id=':1') - + def test_display(self): + """Test the display of molecular information. + + The function used is generic_fns.molecule.display(). + """ + + # Set up some data. + self.setup_data() + + # The following should all work without error. + molecule.display() + molecule.display('#Old mol') + molecule.display('#New mol') + + + def test_display_fail(self): + """Test the failure of the display of molecule information. + + The function used is generic_fns.molecule.display(). + """ + + # Set up some data. + self.setup_data() + + # The following should fail. + self.assertRaises(RelaxSpinSelectDisallowError, molecule.display, '@N') + self.assertRaises(RelaxResSelectDisallowError, molecule.display, ':1') + +