mailr3001 - /1.3/test_suite/unit_tests/data/test_diff_tensor.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on January 13, 2007 - 08:26:
Author: bugman
Date: Sat Jan 13 08:26:12 2007
New Revision: 3001

URL: http://svn.gna.org/viewcvs/relax?rev=3001&view=rev
Log:
Modified the 'test_set_Diso' and 'test_set_tm' unit tests to use the proper 
assert functions.


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=3001&r1=3000&r2=3001&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:26:12 
2007
@@ -46,14 +46,14 @@
     def test_set_Diso(self):
         """Test that the Diso parameter cannot be set."""
 
-        # Try to set Diso to the tm value of 10 ns.
+        # 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:
-            assert message.text == "The object 'Diso' is not modifiable."
+            self.assert_(message.text == "The object 'Diso' is not 
modifiable.")
 
         # Make sure that the Diso parameter has not been set.
-        assert not hasattr(self.diff_data, 'Diso')
+        self.assert_(not hasattr(self.diff_data, 'Diso'))
 
 
     def test_set_tm(self):
@@ -63,8 +63,8 @@
         self.diff_data.tm = 1e-8
 
         # Test that the tm parameter has been set correctly.
-        assert hasattr(self.diff_data, 'tm')
-        assert self.diff_data.tm == 1e-8
+        self.assert_(hasattr(self.diff_data, 'tm'))
+        self.assertEqual(self.diff_data.tm, 1e-8)
 
 
 if __name__ == '__main__':




Related Messages


Powered by MHonArc, Updated Sat Jan 13 08:40:05 2007