mailr3883 - /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:36:
Author: bugman
Date: Sat Nov 24 12:36:22 2007
New Revision: 3883

URL: http://svn.gna.org/viewcvs/relax?rev=3883&view=rev
Log:
Added a unit test for the proper operation of the molecule loop when no data 
pipe 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=3883&r1=3882&r2=3883&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:36:22 2007
@@ -134,6 +134,24 @@
         self.assertEqual(i, 0)
 
 
+    def test_molecule_loop_no_pipe(self):
+        """Test the proper operation of the molecule loop when no data pipe 
is present.
+
+        The function tested is generic_fns.selection.molecule_loop().
+        """
+
+        # Reset.
+        relax_data_store.__reset__()
+
+        # Function for the problem of catching an error in a generator 
function.
+        def fail_test():
+            for molecule in selection.molecule_loop():
+                pass
+
+        # Test for the no pipe error.
+        self.assertRaises(RelaxNoPipeError, fail_test)
+
+
     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