mailr18149 - /trunk/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py


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

Header


Content

Posted by edward on December 17, 2012 - 12:57:
Author: bugman
Date: Mon Dec 17 12:57:18 2012
New Revision: 18149

URL: http://svn.gna.org/viewcvs/relax?rev=18149&view=rev
Log:
Created 4 unit tests to demonstrate the failure of the selection object with 
spin IDs.


Modified:
    trunk/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py

Modified: trunk/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py?rev=18149&r1=18148&r2=18149&view=diff
==============================================================================
--- trunk/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py (original)
+++ trunk/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py Mon Dec 17 
12:57:18 2012
@@ -455,6 +455,46 @@
         self.assertEqual(obj.spins, [])
 
 
+    def test_Selection_range_contains_resid(self):
+        """The Selection object ":1-70" contains the res ':1'."""
+
+        # The Selection object.
+        obj = mol_res_spin.Selection(":1-70")
+
+        # Check that the residue ID is in the selection.
+        self.assert_(':1' in obj)
+
+
+    def test_Selection_range_contains_resid2(self):
+        """The Selection object ":1-70" does not contain the res ':71'."""
+
+        # The Selection object.
+        obj = mol_res_spin.Selection(":1-70")
+
+        # Check that the residue ID is in the selection.
+        self.assert_(':71' not in obj)
+
+
+    def test_Selection_range_contains_spinid(self):
+        """The Selection object ":1-70" contains the spin ':1@N'."""
+
+        # The Selection object.
+        obj = mol_res_spin.Selection(":1-70")
+
+        # Check that the residue ID is in the selection.
+        self.assert_(':1@N' in obj)
+
+
+    def test_Selection_range_contains_spinid2(self):
+        """The Selection object ":1-70" does not contain the spin ':71@C'."""
+
+        # The Selection object.
+        obj = mol_res_spin.Selection(":1-70")
+
+        # Check that the residue ID is in the selection.
+        self.assert_(':71@C' not in obj)
+
+
     def test_count_spins(self):
         """Test that the number of spins can be properly counted.
 




Related Messages


Powered by MHonArc, Updated Mon Dec 17 14:40:01 2012