Author: bugman Date: Sun May 4 14:07:18 2008 New Revision: 6081 URL: http://svn.gna.org/viewcvs/relax?rev=6081&view=rev Log: A bit of code rearrangement as a test. Modified: branches/mol_res_spin_module_rename/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py branches/mol_res_spin_module_rename/test_suite/unit_tests/residue_testing_base.py Modified: branches/mol_res_spin_module_rename/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/branches/mol_res_spin_module_rename/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py?rev=6081&r1=6080&r2=6081&view=diff ============================================================================== --- branches/mol_res_spin_module_rename/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py (original) +++ branches/mol_res_spin_module_rename/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py Sun May 4 14:07:18 2008 @@ -32,44 +32,13 @@ from test_suite.unit_tests.spin_testing_base import Spin_base_class -class Molecule: - """Class for creating an object containing the molecule specific fns.""" - - copy = mol_res_spin.copy_molecule - create = mol_res_spin.create_molecule - delete = mol_res_spin.delete_molecule - display = mol_res_spin.display_molecule - name = mol_res_spin.name_molecule - -class Residue: - """Class for creating an object containing the residue specific fns.""" - - copy = mol_res_spin.copy_residue - create = mol_res_spin.create_residue - delete = mol_res_spin.delete_residue - display = mol_res_spin.display_residue - name = mol_res_spin.name_residue - number = mol_res_spin.number_residue - -class Spin: - """Class for creating an object containing the spin specific fns.""" - - copy = mol_res_spin.copy_spin - create = mol_res_spin.create_spin - delete = mol_res_spin.delete_spin - display = mol_res_spin.display_spin - name = mol_res_spin.name_spin - number = mol_res_spin.number_spin - - - class Test_mol_res_spin(Molecule_base_class, Residue_base_class, Spin_base_class, TestCase): """Unit tests for the functions of the 'generic_fns.mol_res_spin' module.""" - # Set up the molecule, residue, and spin objects. - molecule = Molecule() - residue = Residue() - spin = Spin() + # Place the molecule, residue, and spin modules into the class namespace. + molecule_fns = molecule + residue_fns = residue + spin_fns = spin def setUp(self): """Set up some molecules, residues, and spins for testing.""" Modified: branches/mol_res_spin_module_rename/test_suite/unit_tests/residue_testing_base.py URL: http://svn.gna.org/viewcvs/relax/branches/mol_res_spin_module_rename/test_suite/unit_tests/residue_testing_base.py?rev=6081&r1=6080&r2=6081&view=diff ============================================================================== --- branches/mol_res_spin_module_rename/test_suite/unit_tests/residue_testing_base.py (original) +++ branches/mol_res_spin_module_rename/test_suite/unit_tests/residue_testing_base.py Sun May 4 14:07:18 2008 @@ -506,20 +506,20 @@ """ # Create the first residue and add some data to its spin container. - self.residue.create(1, 'Ala') + residue.create(1, 'Ala') # Copy the residue a few times. - self.residue.copy(res_from=':1', res_to=':2') - self.residue.copy(res_from=':1', res_to=':3') + residue.copy(res_from=':1', res_to=':2') + residue.copy(res_from=':1', res_to=':3') # Change the first residue's data. relax_data_store['orig'].mol[0].res[0].spin[0].name = 'His' # Copy the residue once more. - self.residue.copy(res_from=':1', res_to=':4,Met') + residue.copy(res_from=':1', res_to=':4,Met') # Try renumbering all alanines. - self.assertRaises(RelaxError, self.residue.renumber, res_id=':Ala', new_number=10) + self.assertRaises(RelaxError, residue.renumber, res_id=':Ala', new_number=10) def test_renumber_residue_no_spin(self):