Author: bugman Date: Sun Nov 25 16:30:00 2007 New Revision: 3907 URL: http://svn.gna.org/viewcvs/relax?rev=3907&view=rev Log: Implemented the params unit test for the diffusion_tensor.init() user function.
Modified: 1.3/test_suite/unit_tests/_prompt/test_diffusion_tensor.py Modified: 1.3/test_suite/unit_tests/_prompt/test_diffusion_tensor.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_diffusion_tensor.py?rev=3907&r1=3906&r2=3907&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/_prompt/test_diffusion_tensor.py (original) +++ 1.3/test_suite/unit_tests/_prompt/test_diffusion_tensor.py Sun Nov 25 16:30:00 2007 @@ -25,9 +25,8 @@ # relax module imports. from data import Data as relax_data_store -from generic_fns import residue from prompt.diffusion_tensor import Diffusion_tensor -from relax_errors import RelaxError, RelaxIntError, RelaxNoPipeError, RelaxNoneStrError, RelaxStrError +from relax_errors import RelaxNumTupleError from test_suite.unit_tests.diffusion_tensor_testing_base import Diffusion_tensor_base_class # Unit test imports. @@ -40,4 +39,19 @@ # Instantiate the user function class. diffusion_tensor_fns = Diffusion_tensor(fake_relax.fake_instance()) - residue_fns = residue + + + def test_init_argfail_params(self): + """Proper failure of the diffusion_tensor.init() user function for the params argument.""" + + # Loop over the data types. + for data in DATA_TYPES: + # Catch the float list arguments, and skip them. + if data[0] == 'float tuple': + continue + + # The argument test. + self.assertRaises(RelaxNumTupleError, self.diffusion_tensor_fns.init, params=data[1]) + + + _______________________________________________ relax (http://nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits