Author: bugman Date: Sat Nov 24 12:35:21 2007 New Revision: 3882 URL: http://svn.gna.org/viewcvs/relax?rev=3882&view=rev Log: Added a unit test for the proper operation of the spin 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=3882&r1=3881&r2=3882&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:35:21 2007 @@ -563,6 +563,24 @@ self.assertEqual(i, 0) + def test_spin_loop_no_pipe(self): + """Test the proper operation of the spin loop when no data pipe is present. + + The function tested is generic_fns.selection.spin_loop(). + """ + + # Reset. + relax_data_store.__reset__() + + # Function for the problem of catching an error in a generator function. + def fail_test(): + for spin in selection.spin_loop(): + pass + + # Test for the no pipe error. + self.assertRaises(RelaxNoPipeError, fail_test) + + def test_spin_loop_no_selection(self): """Test the proper operation of the spin loop when no selection is present.