Author: bugman Date: Sat Jun 28 23:50:43 2008 New Revision: 6544 URL: http://svn.gna.org/viewcvs/relax?rev=6544&view=rev Log: Fixes for the object_comparison() method. The objects in string form are now compared to avoid comparison nastiness and, in compensation, the object types are also checked. Modified: 1.3/test_suite/system_tests/model_free.py Modified: 1.3/test_suite/system_tests/model_free.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/model_free.py?rev=6544&r1=6543&r2=6544&view=diff ============================================================================== --- 1.3/test_suite/system_tests/model_free.py (original) +++ 1.3/test_suite/system_tests/model_free.py Sat Jun 28 23:50:43 2008 @@ -124,12 +124,22 @@ if search('^_', name): continue + # Skip original class methods. + if name in obj1.__class__.__dict__.keys(): + continue + + # Print out. + print "\t" + name + # Get the sub-objects. sub_obj1 = getattr(obj1, name) sub_obj2 = getattr(obj2, name) - # Check that they are equal. - self.assertEqual(sub_obj1, sub_obj2) + # Check that they are of the same type. + self.assertEqual(type(sub_obj1), type(sub_obj2)) + + # Check that they are equal (converting to strings to avoid comparison nastiness). + self.assertEqual(str(sub_obj1), str(sub_obj2)) def test_create_m4(self):