mailr3880 - /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:33:
Author: bugman
Date: Sat Nov 24 12:33:06 2007
New Revision: 3880

URL: http://svn.gna.org/viewcvs/relax?rev=3880&view=rev
Log:
Fixed the unit test of the residue loop with no data pipes present.

The unittest framework couldn't handle the generator function, so an 
intermediary function was
created!


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=3880&r1=3879&r2=3880&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:33:06 2007
@@ -352,8 +352,13 @@
         # Reset.
         relax_data_store.__reset__()
 
+        # Function for the problem of catching an error in a generator 
function.
+        def fail_test():
+            for residue in selection.residue_loop():
+                pass
+
         # Test for the no pipe error.
-        self.assertRaises(RelaxNoPipeError, selection.residue_loop)
+        self.assertRaises(RelaxNoPipeError, fail_test)
 
 
     def test_residue_loop_no_selection(self):




Related Messages


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