Re: [Python-Dev] unittest isolation and warnings

2017年11月18日 03:30:51 -0800

Hi Christian,
On 2017年11月17日 10:15:24 +0100
Christian Tismer <[email protected]> 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.
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to