#37072: assertWarnsMessage() also ignores entire warning category
-------------------------------------+-------------------------------------
     Reporter:  Mike Edmunds         |                    Owner:  Artyom
                                     |  Kotovskiy
         Type:  Bug                  |                   Status:  assigned
    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 Artyom Kotovskiy):

 Replying to [comment:5 Mike Edmunds]:
 > Python unittest's `assertWarnsRegex()` has the same (problematic)
 behavior: https://github.com/python/cpython/issues/143231. And a comment
 in that issue proposes a similar fix to the one I described above for
 Django's `assertWarnsMessage()`.
 >
 > In some local experimentation, there are a handful of existing Django
 tests that unintentionally depend on the current behavior and would need
 to be updated (e.g., by adding appropriate `ignore_warnings()` for the
 non-matching deprecation messages those tests don't care about).
 >
 > There also seem to be a handful of existing Django tests that
 ''intentionally'' depend on `assertWarnsMessage()` capturing ''multiple''
 instances of the same message. (So the answer to my question in
 `test_duplicate_warnings_should_maybe_also_error()` above is: duplicate
 warnings should ''not'' error, at least not by default.)
 >


 Thanks for the suggestions and analysis. I’m taking my time going through
 the test case code since I’m new to contributing.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/37072#comment:6>
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/0107019de067d9bd-7ccf8663-4241-4ee8-9b00-dd32b8e2916e-000000%40eu-central-1.amazonses.com.

Reply via email to