Author: bugman Date: Wed Nov 28 18:39:43 2007 New Revision: 4121 URL: http://svn.gna.org/viewcvs/relax?rev=4121&view=rev Log: Added 4 more unit tests for the new 'tensor' args. 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=4121&r1=4120&r2=4121&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 Wed Nov 28 18:39:43 2007 @@ -40,6 +40,19 @@ align_tensor_fns = Align_tensor(fake_relax.fake_instance()) + def test_copy_argfail_tensor_from(self): + """Failure of the tensor_from arg of the align_tensor.copy() 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.copy, tensor_from=data[1]) + + def test_copy_argfail_pipe_from(self): """The pipe_from arg test of the align_tensor.copy() user function.""" @@ -53,6 +66,19 @@ self.assertRaises(RelaxNoneStrError, self.align_tensor_fns.copy, pipe_from=data[1]) + def test_copy_argfail_tensor_to(self): + """Failure of the tensor_to arg of the align_tensor.copy() 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.copy, tensor_to=data[1]) + + def test_copy_argfail_pipe_to(self): """The pipe_to arg test of the align_tensor.copy() user function.""" @@ -71,6 +97,32 @@ # Test that both cannot be None (the default)! self.assertRaises(RelaxError, self.align_tensor_fns.copy) + + + def test_delete_argfail_tensor(self): + """Failure of the tensor arg of the align_tensor.delete() 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.delete, tensor=data[1]) + + + def test_display_argfail_tensor(self): + """Failure of the tensor arg of the align_tensor.display() 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.display, tensor=data[1]) def test_init_argfail_tensor(self):