Author: bugman Date: Sat Nov 24 12:05:20 2007 New Revision: 3874 URL: http://svn.gna.org/viewcvs/relax?rev=3874&view=rev Log: Added a unit test for the proper operation of the spin 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=3874&r1=3873&r2=3874&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:05:20 2007 @@ -482,6 +482,23 @@ self.assertEqual(i, 2) + def test_spin_loop_no_data(self): + """Test the proper operation of the spin loop when no data is present. + + The function tested is generic_fns.selection.spin_loop(). + """ + + # Reset. + relax_data_store.__reset__() + + # Loop over the spins. + i = 0 + for spin in selection.spin_loop(): + i = i + 1 + + # Test loop length. + self.assertEqual(i, 0) + def test_spin_loop_no_selection(self): """Test the proper operation of the spin loop when no selection is present.