[issue20362] longMessage attribute is ignored in unittest.TestCase.assertRegexpMatches etc

Ilia Kurenkov report at bugs.python.org
Tue Apr 14 05:17:11 CEST 2015


Ilia Kurenkov added the comment:

Thanks for the quick response, Berker! Let me address your comments in the order you made them.

#1: removing checking for "kot" in the exception args.
This line was causing the tests to fail, which is how I noticed it. The reason it fails (I think) is caused by the changes made in the patch. Namely, the fact that we're strictly sticking to longMessage=False means the custom message passed by the user (in this particular case that's "Message") is be the *only* thing sent to AssertionError. Thus checking for the presence of "kot" in this error's args doesn't seem to make much sense and will simply keep breaking our tests.
Now it goes without saying that I may have missed something, please let me know if that's the case.

#2
For some reason I got the impression that the tests should be using the newer method names, but since using the old ones didn't break them on my machine, I've updated the patch file accordingly. I'll upload it pending your feedback regarding #1.

Glad to help!
Ilia.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20362>
_______________________________________


More information about the Python-bugs-list mailing list