This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, djc, giampaolo.rodola, rhettinger
Date 2010-11-01.18:29:19
SpamBayes Score 1.4929541e-10
Marked as misclassified No
Message-id <AANLkTimZHW3YW=en+HT50ZhAz+9eM5=q=vxGJ=nz=Vxn@mail.gmail.com>
In-reply-to <1288635203.3.0.260095333734.issue10221@psf.upfronthosting.co.za>
Content
On Mon, Nov 1, 2010 at 2:13 PM, Raymond Hettinger
<report@bugs.python.org> wrote:
..
>
> We don't usually test the content of error messages because they are not a guaranteed behavior.
>
I recall that when I asked about this on #python-dev, someone pointed
to places where content of error messages is tested in python unit
tests.  I also asked whether such tests should be marked as cpython
details, and the answer was know.  Unfortunately I don't remember who
was telling me that, but it sounded reasonable enough that I submitted
the tests.

I think if testing error messages is a grey area, in this case it is
reasonable to have a test for at least two reasons:

1. It was reported as a bug, so users already expect this behavior.

2. There is no prose in the error message, just the key, so it is not
as arbitrary as other error messages.

Note that in my tests I deliberately tested only e.args[0] and not
str(e) or e.args[1:].
History
Date User Action Args
2010-11-01 18:29:22belopolskysetrecipients: + belopolsky, rhettinger, giampaolo.rodola, djc
2010-11-01 18:29:20belopolskylinkissue10221 messages
2010-11-01 18:29:20belopolskycreate