Author: bugman Date: Sun Apr 20 17:04:43 2008 New Revision: 5846 URL: http://svn.gna.org/viewcvs/relax?rev=5846&view=rev Log: Wrote the test_Selection_full_spin_id() for testing the string identifier '#Ap4Aase:2&:Glu@63&@NH'. Modified: 1.3/test_suite/unit_tests/_generic_fns/test_selection.py Modified: 1.3/test_suite/unit_tests/_generic_fns/test_selection.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_generic_fns/test_selection.py?rev=5846&r1=5845&r2=5846&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/_generic_fns/test_selection.py (original) +++ 1.3/test_suite/unit_tests/_generic_fns/test_selection.py Sun Apr 20 17:04:43 2008 @@ -180,6 +180,24 @@ self.assertEqual(obj._union[0]._intersect[1].spins, []) + def test_Selection_full_spin_id(self): + """Test the Selection object for the single spin identifier '#Ap4Aase:2&:Glu@63&@NH'.""" + + # The Selection object. + obj = selection.Selection("#Ap4Aase:2&:Glu@63&@NH") + + # Alias the current data pipe. + cdp = relax_data_store[relax_data_store.current_pipe] + + # The molecule, residue, and spin container for that spin. + mol = cdp.mol[0] + res = mol[1] + spin = res[0] + + # Test that the spin is in the selection. + self.assert_((mol, res, spin) in obj) + + def test_count_spins(self): """Test that the number of spins can be properly counted.