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/2017-November/150615.html below:

[Python-Dev] unittest isolation and warnings

[Python-Dev] unittest isolation and warnings [Python-Dev] unittest isolation and warningsAntoine Pitrou solipsis at pitrou.net
Sat Nov 18 06:27:54 EST 2017
Hi Christian,

On Fri, 17 Nov 2017 10:15:24 +0100
Christian Tismer <tismer at stackless.com> wrote:
> 
> Example:
> One of my tests emits warnings when a certain condition is
> met. Instead of reporting the error immediately, it uses
> warnings, and at the end of the test, an error is produced
> if there were warnings.

I suggest you try using subtests.  This would allow you to report
several errors from a given test method.
https://docs.python.org/3/library/unittest.html#distinguishing-test-iterations-using-subtests

Regards

Antoine.


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