Author: bugman Date: Wed Nov 21 01:00:41 2007 New Revision: 3755 URL: http://svn.gna.org/viewcvs/relax?rev=3755&view=rev Log: Implemented the compress_type 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=3755&r1=3754&r2=3755&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 01:00:41 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 RelaxBinError, RelaxNoneStrError, RelaxStrError +from relax_errors import RelaxBinError, RelaxIntError, RelaxNoneStrError, RelaxStrError # Set the variable sys.ps3 (this is required by the user functions). @@ -121,4 +121,17 @@ self.assertRaises(RelaxBinError, self.state.save_state, file='a', force=data[1]) + def test_save_argfail_compress_type(self): + """Test the proper failure of the state.save() user function for the compress_type argument.""" + # Loop over the data types. + for data in return_data_types(): + # Catch the int and bin arguments, and skip them. + if data[0] == 'int' or data[0] == 'bin': + continue + + # The argument test. + self.assertRaises(RelaxIntError, self.state.save_state, file='a', compress_type=data[1]) + + +