mailr5846 - /1.3/test_suite/unit_tests/_generic_fns/test_selection.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on April 20, 2008 - 17:04:
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.
 




Related Messages


Powered by MHonArc, Updated Sun Apr 20 17:20:16 2008