Author pitrou
Recipients brett.cannon, michael.foord, pitrou
Date 2010-09-03.10:50:15
SpamBayes Score 0.000289051
Marked as misclassified No
Message-id <1283511017.36.0.0507272422338.issue9754@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-09-03 10:50:17pitrousetrecipients: + pitrou, brett.cannon, michael.foord
2010-09-03 10:50:17pitrousetmessageid: <1283511017.36.0.0507272422338.issue9754@psf.upfronthosting.co.za>
2010-09-03 10:50:15pitroulinkissue9754 messages
2010-09-03 10:50:15pitroucreate