New submission from Antoine Pitrou <pit...@free.fr>:

Similar to assertRaises and assertRaisesRegexp, unittest should provide 
assertWarns and assertWarnsRegexp, to check that a given callable (or piece of 
code) triggers a particular warning.

Currently, you have to do that manually using a mixture of 
warnings.catch_warnings and warnings.filterwarnings, which is pretty annoying.

----------
components: Library (Lib)
messages: 115434
nosy: brett.cannon, michael.foord, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: assertWarns and assertWarnsRegexp
type: feature request
versions: Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9754>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to