Rose Ames added the comment: 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? ---------- nosy: +superluser _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24922> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com