Author: bugman Date: Sun Jul 12 23:31:31 2009 New Revision: 9190 URL: http://svn.gna.org/viewcvs/relax?rev=9190&view=rev Log: Fixes for the unit tests of the user functions shifted from n_state_model to align_tensor. Modified: branches/frame_order/test_suite/unit_tests/_prompt/test_align_tensor.py branches/frame_order/test_suite/unit_tests/_prompt/test_n_state_model.py Modified: branches/frame_order/test_suite/unit_tests/_prompt/test_align_tensor.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order/test_suite/unit_tests/_prompt/test_align_tensor.py?rev=9190&r1=9189&r2=9190&view=diff ============================================================================== --- branches/frame_order/test_suite/unit_tests/_prompt/test_align_tensor.py (original) +++ branches/frame_order/test_suite/unit_tests/_prompt/test_align_tensor.py Sun Jul 12 23:31:31 2009 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2007-2008 Edward d'Auvergne # +# Copyright (C) 2007-2009 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -243,6 +243,57 @@ self.assertRaises(RelaxNoneListstrError, self.align_tensor_fns.matrix_angles, tensors=data[1]) + def test_reduction_argfail_full_tensor(self): + """Failure of the full_tensor arg of the align_tensor.reduction() user function.""" + + # Loop over the data types. + for data in DATA_TYPES: + # Catch the str argument, and skip it. + if data[0] == 'str': + continue + + # The argument test. + self.assertRaises(RelaxStrError, self.align_tensor_fns.reduction, full_tensor=data[1]) + + + def test_reduction_argfail_red_tensor(self): + """Failure of the red_tensor arg of the align_tensor.reduction() user function.""" + + # Loop over the data types. + for data in DATA_TYPES: + # Catch the str argument, and skip it. + if data[0] == 'str': + continue + + # The argument test. + self.assertRaises(RelaxStrError, self.align_tensor_fns.reduction, full_tensor='test', red_tensor=data[1]) + + def test_set_domain_argfail_tensor(self): + """Failure of the tensor arg of the align_tensor.set_domain() user function.""" + + # Loop over the data types. + for data in DATA_TYPES: + # Catch the str argument, and skip it. + if data[0] == 'str': + continue + + # The argument test. + self.assertRaises(RelaxStrError, self.align_tensor_fns.set_domain, tensor=data[1]) + + + def test_set_domain_argfail_domain(self): + """Failure of the domain arg of the align_tensor.set_domain() user function.""" + + # Loop over the data types. + for data in DATA_TYPES: + # Catch the str argument, and skip it. + if data[0] == 'str': + continue + + # The argument test. + self.assertRaises(RelaxStrError, self.align_tensor_fns.set_domain, domain=data[1]) + + def test_svd_argfail_basis_set(self): """The proper failure of the align_tensor.svd() user function for the basis_set argument.""" Modified: branches/frame_order/test_suite/unit_tests/_prompt/test_n_state_model.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order/test_suite/unit_tests/_prompt/test_n_state_model.py?rev=9190&r1=9189&r2=9190&view=diff ============================================================================== --- branches/frame_order/test_suite/unit_tests/_prompt/test_n_state_model.py (original) +++ branches/frame_order/test_suite/unit_tests/_prompt/test_n_state_model.py Sun Jul 12 23:31:31 2009 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2008 Edward d'Auvergne # +# Copyright (C) 2008-2009 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -194,57 +194,3 @@ # The argument test. self.assertRaises(RelaxStrError, self.n_state_model_fns.select_model, model=data[1]) - - - def test_set_domain_argfail_tensor(self): - """Failure of the tensor arg of the n_state_model.set_domain() user function.""" - - # Loop over the data types. - for data in DATA_TYPES: - # Catch the str argument, and skip it. - if data[0] == 'str': - continue - - # The argument test. - self.assertRaises(RelaxStrError, self.n_state_model_fns.set_domain, tensor=data[1]) - - - def test_set_domain_argfail_domain(self): - """Failure of the domain arg of the n_state_model.set_domain() user function.""" - - # Loop over the data types. - for data in DATA_TYPES: - # Catch the str argument, and skip it. - if data[0] == 'str': - continue - - # The argument test. - self.assertRaises(RelaxStrError, self.n_state_model_fns.set_domain, domain=data[1]) - - - def test_set_type_argfail_tensor(self): - """Failure of the tensor arg of the n_state_model.set_type() user function.""" - - # Loop over the data types. - for data in DATA_TYPES: - # Catch the str argument, and skip it. - if data[0] == 'str': - continue - - # The argument test. - self.assertRaises(RelaxStrError, self.n_state_model_fns.set_type, tensor=data[1]) - - - def test_set_type_argfail_red(self): - """Failure of the red arg of the n_state_model.set_type() user function.""" - - # Loop over the data types. - for data in DATA_TYPES: - # Catch the bool argument, and skip it. - if data[0] == 'bool': - continue - - # The argument test. - self.assertRaises(RelaxBoolError, self.n_state_model_fns.set_type, tensor='test', red=data[1]) - -