[issue6966] Ability to refer to arguments in TestCase.fail* methods

2014-06-13 Thread R. David Murray
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 -> c

[issue6966] Ability to refer to arguments in TestCase.fail* methods

2010-06-17 Thread Hari Krishna Dara
Hari Krishna Dara 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 optionally include

[issue6966] Ability to refer to arguments in TestCase.fail* methods

2010-06-17 Thread Hari Krishna Dara
Hari Krishna Dara 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. Argument msg coul

[issue6966] Ability to refer to arguments in TestCase.fail* methods

2010-06-17 Thread Hari Krishna Dara
Changes by Hari Krishna Dara : -- nosy: +haridsv ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue6966] Ability to refer to arguments in TestCase.fail* methods

2009-09-22 Thread Johan Tufvesson
Johan Tufvesson 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 feature, dreami

[issue6966] Ability to refer to arguments in TestCase.fail* methods

2009-09-22 Thread Michael Foord
Michael Foord 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. -- ___ Python tracker <

[issue6966] Ability to refer to arguments in TestCase.fail* methods

2009-09-22 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: -> michael.foord nosy: +michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue6966] Ability to refer to arguments in TestCase.fail* methods

2009-09-22 Thread Johan Tufvesson
New submission from Johan Tufvesson : 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 accomplished by bindi