A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-January/131264.html below:

[Python-Dev] test.support.check_warnings

[Python-Dev] test.support.check_warnings [Python-Dev] test.support.check_warningsEthan Furman ethan at stoneleaf.us
Sun Jan 12 08:10:43 CET 2014
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):
>        exec(test)

Well, this is test.support!  I expect magic!  ;)

Thanks for setting me straight, got it working.

--
~Ethan~
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4