Author: bugman Date: Mon Nov 26 11:53:11 2007 New Revision: 3990 URL: http://svn.gna.org/viewcvs/relax?rev=3990&view=rev Log: Added 3 unit tests for the unimplemented align_tensor.copy() user function. These are copies of the almost identical diffusion_tensor.copy() user function tests. Modified: branches/N_state_model/test_suite/unit_tests/_prompt/test_align_tensor.py Modified: branches/N_state_model/test_suite/unit_tests/_prompt/test_align_tensor.py URL: http://svn.gna.org/viewcvs/relax/branches/N_state_model/test_suite/unit_tests/_prompt/test_align_tensor.py?rev=3990&r1=3989&r2=3990&view=diff ============================================================================== --- branches/N_state_model/test_suite/unit_tests/_prompt/test_align_tensor.py (original) +++ branches/N_state_model/test_suite/unit_tests/_prompt/test_align_tensor.py Mon Nov 26 11:53:11 2007 @@ -38,6 +38,39 @@ # Instantiate the user function class. align_tensor_fns = Align_tensor(fake_relax.fake_instance()) + + + def test_copy_argfail_pipe_from(self): + """The pipe_from arg test of the align_tensor.copy() user function.""" + + # Loop over the data types. + for data in DATA_TYPES: + # Catch the None and str arguments, and skip them. + if data[0] == 'None' or data[0] == 'str': + continue + + # The argument test. + self.assertRaises(RelaxNoneStrError, self.align_tensor_fns.copy, pipe_from=data[1]) + + + def test_copy_argfail_pipe_to(self): + """The pipe_to arg test of the align_tensor.copy() user function.""" + + # Loop over the data types. + for data in DATA_TYPES: + # Catch the None and str arguments, and skip them. + if data[0] == 'None' or data[0] == 'str': + continue + + # The argument test. + self.assertRaises(RelaxNoneStrError, self.align_tensor_fns.copy, pipe_to=data[1]) + + + def test_copy_argfail_both_pipes(self): + """The pipe_from and pipe_to arg test of the align_tensor.copy() user function.""" + + # Test that both cannot be None (the default)! + self.assertRaises(RelaxError, self.align_tensor_fns.copy) def test_init_argfail_params(self):