mailr3875 - /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 November 24, 2007 - 12:21:
Author: bugman
Date: Sat Nov 24 12:06:44 2007
New Revision: 3875

URL: http://svn.gna.org/viewcvs/relax?rev=3875&view=rev
Log:
Added a unit test for the proper operation of the molecule loop when no data 
is present.


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=3875&r1=3874&r2=3875&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 Sat Nov 24 
12:06:44 2007
@@ -113,6 +113,24 @@
         self.assertEqual(len(list(selection.molecule_loop('#RNA'))), 1)
 
 
+    def test_molecule_loop_no_data(self):
+        """Test the proper operation of the molecule loop when no data is 
present.
+
+        The function tested is generic_fns.selection.molecule_loop().
+        """
+
+        # Reset.
+        relax_data_store.__reset__()
+
+        # Loop over the molecules.
+        i = 0
+        for molecule in selection.molecule_loop():
+            i = i + 1
+
+        # Test loop length.
+        self.assertEqual(i, 0)
+
+
     def test_molecule_loop_no_selection(self):
         """Test the proper operation of the molecule loop when no selection 
is present.
 




Related Messages


Powered by MHonArc, Updated Sat Nov 24 12:40:09 2007