Message258558
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? |
|
Date |
User |
Action |
Args |
2016-01-18 22:58:19 | superluser | set | recipients:
+ superluser, rbcollins, ezio.melotti, michael.foord, sleepycal |
2016-01-18 22:58:18 | superluser | set | messageid: <1453157898.99.0.252814661588.issue24922@psf.upfronthosting.co.za> |
2016-01-18 22:58:18 | superluser | link | issue24922 messages |
2016-01-18 22:58:18 | superluser | create | |
|