#37072: assertWarnsMessage() also ignores entire warning category
-----------------------------------+------------------------------------
Reporter: Mike Edmunds | Owner: (none)
Type: Bug | Status: new
Component: Testing framework | Version: 6.0
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 Mike Edmunds):
See also #37076.
I'm thinking maybe `assertWarnsMessage()` should do something like:
- Capture all warnings while running the tested code
- Check that at least one captured warning matches the expected category
and message
- ''Optionally'' check that ''exactly'' one (or exactly a specified
`expected_count`) matches
- Re-emit any non-matching warnings that were captured, to be handled by
the original warning filters
--
Ticket URL: <https://code.djangoproject.com/ticket/37072#comment:3>
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 view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019dd5bffffc-4fc949a6-b817-4666-9aa6-cd432a6fd1c4-000000%40eu-central-1.amazonses.com.