[issue24922] assertWarnsRegex doesn't allow multiple warning messages

2016-04-16 Thread Berker Peksag
Berker Peksag added the comment: Agreed. Let's close this then. -- nosy: +berker.peksag resolution: -> rejected stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue24922] assertWarnsRegex doesn't allow multiple warning messages

2016-04-16 Thread Serhiy Storchaka
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 di

[issue24922] assertWarnsRegex doesn't allow multiple warning messages

2016-04-16 Thread Berker Peksag
Changes by Berker Peksag : -- components: +Library (Lib) -Interpreter Core type: behavior -> enhancement versions: -Python 3.5 ___ Python tracker ___ ___

[issue24922] assertWarnsRegex doesn't allow multiple warning messages

2016-03-13 Thread Robert Collins
Robert Collins added the comment: The context manager errors if *nothing* matches, not if *everything* matches, which is very different to catch_warnings because the filters are used to *exclude* warnings, and excess warnings are errors there. Because of that, there's little if any reason to a

[issue24922] assertWarnsRegex doesn't allow multiple warning messages

2016-01-18 Thread Rose Ames
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

[issue24922] assertWarnsRegex doesn't allow multiple warning messages

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, michael.foord, rbcollins stage: -> needs patch versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker ___ ___

[issue24922] assertWarnsRegex doesn't allow multiple warning messages

2015-08-24 Thread Cal Leeming
New submission from Cal Leeming: There was a discussion/patch in #9754 [1]. This allows for multiple warning types as a tuple, e.g.; self.assertWarnsRegex((DeprecationWarning, RuntimeWarning), "^E1000:") However, it does not allow testing for multiple warning messages, e.g.; expect =