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 superluser
Recipients ezio.melotti, michael.foord, rbcollins, sleepycal, superluser
Date 2016-01-18.22:58:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1453157898.99.0.252814661588.issue24922@psf.upfronthosting.co.za>
In-reply-to
Content
Would this mean that we expect any one of the warnings to be raised, or all of them?  If it's one, the example you give would be equivalent to:

    self.assertWarnsRegex(UserWarning, "^W100[01]")

Matching all of the warnings seems more interesting, but I'm not sure how to handle the context manager attributes.  For instance, right now you can do:

    with self.assertWarnsRegex(FooWarning, "Bar") as cm:
        blah()
    self.assertEquals(cm.lineno, 1000)

Would lineno and filename become lists?  It seems kind of ugly.  What's the advantage over simply testing for each warning separately?
History
Date User Action Args
2016-01-18 22:58:19superlusersetrecipients: + superluser, rbcollins, ezio.melotti, michael.foord, sleepycal
2016-01-18 22:58:18superlusersetmessageid: <1453157898.99.0.252814661588.issue24922@psf.upfronthosting.co.za>
2016-01-18 22:58:18superluserlinkissue24922 messages
2016-01-18 22:58:18superlusercreate