ethan at stoneleaf.us
Sun Jan 12 16:57:18 CET 2014
On 01/12/2014 04:24 AM, Antoine Pitrou wrote:
> On Sat, 11 Jan 2014 23:10:43 -0800
> Ethan Furman <ethan at stoneleaf.us> wrote:
>> On 01/11/2014 05:37 PM, Brett Cannon wrote:
>>> You're assuming the context manager is doing something magical to verify that all calls in the block raise the expected
>>> exception. What you want to do is execute it in a loop::
>>> for test in (...):
>>> with support.check_warnings(("automatic int conversions have been deprecated", DeprecationWarning), quiet=False):
>> Well, this is test.support! I expect magic! ;)
>> Thanks for setting me straight, got it working.
> Or you could, you know, use the new assertWarns():
That's also cool. If I have to touch that code again I'll switch to it.
More information about the Python-Dev