Author: bugman Date: Wed Nov 21 00:56:43 2007 New Revision: 3753 URL: http://svn.gna.org/viewcvs/relax?rev=3753&view=rev Log: Implemented the force arg unit test for the state.save() user function. Modified: 1.3/test_suite/unit_tests/_prompt/test_state.py Modified: 1.3/test_suite/unit_tests/_prompt/test_state.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_state.py?rev=3753&r1=3752&r2=3753&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/_prompt/test_state.py (original) +++ 1.3/test_suite/unit_tests/_prompt/test_state.py Wed Nov 21 00:56:43 2007 @@ -28,7 +28,7 @@ from test_suite.unit_tests.state_testing_base import State_base_class from data_types import return_data_types from prompt.state import State -from relax_errors import RelaxNoneStrError, RelaxStrError +from relax_errors import RelaxBinError, RelaxNoneStrError, RelaxStrError # Set the variable sys.ps3 (this is required by the user functions). @@ -108,4 +108,17 @@ self.assertRaises(RelaxNoneStrError, self.state.save_state, file='a', dir=data[1]) + def test_save_argfail_force(self): + """Test the proper failure of the state.save() user function for the force argument.""" + # Loop over the data types. + for data in return_data_types(): + # Catch the bin arguments, and skip them. + if data[0] == 'bin': + continue + + # The argument test. + self.assertRaises(RelaxBinError, self.state.save_state, file='a', force=data[1]) + + +