#23943: Audit tests decorated with unittest.expectedFailure
--------------------------------------+------------------------------------
Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by mjtamlyn):
1 is a moot point - an expected failure test is run, and is reported as an
"unexpected success" if it passes. In python 3.4 at least I think this is
considered the same as a fail.
I have used expected failure a few times in the postgres array tests where
I expect a query to fail with a database error. If this starts passing,
I'd like to know about it and update the documentation. I could catch and
inspect the error instead, but I feel saying "run this and I expect it to
fail" is better than "run this and expect a given error from outside our
code" - I'd use `assertRaises` to check my own `raise` statements only.
I don't mind if this is changed (or at least more clearly commented).
--
Ticket URL: <https://code.djangoproject.com/ticket/23943#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.ec06108c6612ac5a52f34e3e25545673%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.