mailr5707 - /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 14, 2008 - 18:52:
Author: bugman
Date: Mon Apr 14 18:52:50 2008
New Revision: 5707

URL: http://svn.gna.org/viewcvs/relax?rev=5707&view=rev
Log:
Wrote the unit test test_spin_loop_boolean_or().


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=5707&r1=5706&r2=5707&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 Mon Apr 14 
18:52:50 2008
@@ -966,6 +966,30 @@
         self.assertEqual(i, 2)
 
 
+    def test_spin_loop_boolean_or(self):
+        """Test the operation of the spin loop with the selection 
"#Ap4Aase:Glu | #RNA@C8".
+
+        The function tested is generic_fns.selection.spin_loop().
+        """
+
+        # Selection, and spin name and number.
+        select = [1, 0, 1]
+        name = ['NH', 'C8', 'C8']
+        num = [63, None, None]
+
+        # Loop over the spins.
+        i = 0
+        for spin in selection.spin_loop("#Ap4Aase:Glu | #RNA@C8"):
+            # Test the spin.
+            self.assertEqual([spin.select, spin.name, spin.num], [select[i], 
name[i], num[i]])
+
+            # Increment i.
+            i = i + 1
+
+        # Test loop length.
+        self.assertEqual(i, 3)
+
+
     def test_spin_loop_multiatom(self):
         """Test the proper operation of the spin loop with spin selection 
'@NH|@N5'.
 




Related Messages


Powered by MHonArc, Updated Mon Apr 14 21:20:17 2008