[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 -

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

2010-06-17 Thread Hari Krishna Dara
Changes by Hari Krishna Dara harid...@gmail.com: -- nosy: +haridsv ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6966 ___ ___ Python-bugs-list

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

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

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

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

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

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

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

2009-09-22 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: - michael.foord nosy: +michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6966 ___

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

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

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

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