Author: bugman Date: Sat Nov 24 12:22:24 2007 New Revision: 3879 URL: http://svn.gna.org/viewcvs/relax?rev=3879&view=rev Log: Added a unit test for the proper operation of the residue 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=3879&r1=3878&r2=3879&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:22:24 2007 @@ -331,6 +331,9 @@ # Reset. relax_data_store.__reset__() + # Add a data pipe to the data store. + relax_data_store.add(pipe_name='orig', pipe_type='mf') + # Loop over the residues. i = 0 for residue in selection.residue_loop(): @@ -338,6 +341,19 @@ # Test loop length. self.assertEqual(i, 0) + + + def test_residue_loop_no_pipe(self): + """Test the proper operation of the residue loop when no data pipe is present. + + The function tested is generic_fns.selection.residue_loop(). + """ + + # Reset. + relax_data_store.__reset__() + + # Test for the no pipe error. + self.assertRaises(RelaxNoPipeError, selection.residue_loop) def test_residue_loop_no_selection(self):