R. David Murray added the comment:
This appears to be me to be obsolete, given that long messages are now the
default, and the message argument enhances the long message rather than
replacing it.
--
nosy: +r.david.murray
resolution: - out of date
stage: - resolved
status: open -
Changes by Hari Krishna Dara harid...@gmail.com:
--
nosy: +haridsv
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6966
___
___
Python-bugs-list
Hari Krishna Dara harid...@gmail.com added the comment:
Changing unittest.TestCase.failUnlessEqual() to something like this will be
very useful:
def failUnlessEqual(self, first, second, msg=None):
Fail if the two objects are unequal as determined by the '=='
operator.
Hari Krishna Dara harid...@gmail.com added the comment:
Oops... the dict part should have been dict(lhs=first, rhs=second):
def failUnlessEqual(self, first, second, msg=None):
Fail if the two objects are unequal as determined by the '=='
operator. Argument msg could
New submission from Johan Tufvesson j...@hms.se:
In the unittest module, TestCase class:
If one wants to provide a more descriptive fail message compared to the
default, it is often valuable to be able to refer to the arguments
evaluated by the fail*- (or assert*-) method. This can be
Changes by Georg Brandl ge...@python.org:
--
assignee: - michael.foord
nosy: +michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6966
___
Michael Foord mich...@voidspace.org.uk added the comment:
The new longMessage class attribute on TestCase already shows both
arguments when a call to assertEqual fails (the failUnless methods are
now deprecated) - even if you supply a custom message.
--
Johan Tufvesson j...@hms.se added the comment:
I admit that I had not seen the longMessage attribute. That is better
than the present possibilities in 2.6, although not as configurable as
my suggestion (but with better backwards compatibility).
Personally I will be a user of the longMessage