[issue24922] assertWarnsRegex doesn't allow multiple warning messages

Serhiy Storchaka report at bugs.python.org
Sat Apr 16 14:03:13 EDT 2016


Serhiy Storchaka added the comment:

I think there is a little need for this feature. On other hand, its use looks complicated, and it will likely complicate the implementation.

If tested types are same, but messages differ, messages can be combined in on regex: 'msg1|msg2'.

If tested types differ, but messages are same, this case is already supported.

If tested types and messages differ, you can test with combined regex, and then check a context manager object that the message matches the type. But this is very rare case.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24922>
_______________________________________


More information about the Python-bugs-list mailing list