Author: bugman Date: Sat Jan 13 08:32:59 2007 New Revision: 3002 URL: http://svn.gna.org/viewcvs/relax?rev=3002&view=rev Log: Modified the 'test_set_Diso' unit test. Rather than testing the RelaxError message string, the 'self.assertRaises()' function is called to assert that a RelaxError must occur. Modified: 1.3/test_suite/unit_tests/data/test_diff_tensor.py Modified: 1.3/test_suite/unit_tests/data/test_diff_tensor.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/data/test_diff_tensor.py?rev=3002&r1=3001&r2=3002&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/data/test_diff_tensor.py (original) +++ 1.3/test_suite/unit_tests/data/test_diff_tensor.py Sat Jan 13 08:32:59 2007 @@ -46,11 +46,8 @@ def test_set_Diso(self): """Test that the Diso parameter cannot be set.""" - # Assert that Diso cannot be set (to the tm value of 10 ns). - try: - self.diff_data.Diso = 1/(6*1e-8) - except RelaxError, message: - self.assert_(message.text == "The object 'Diso' is not modifiable.") + # Assert that a RelaxError occurs when Diso is set (to the tm value of 10 ns). + self.assertRaises(RelaxError, setattr, self.diff_data, 'Diso', 1/(6*1e-8)) # Make sure that the Diso parameter has not been set. self.assert_(not hasattr(self.diff_data, 'Diso'))