homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author facundobatista
Recipients facundobatista
Date 2016年09月13日.20:12:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473797531.08.0.417014131559.issue28135@psf.upfronthosting.co.za>
In-reply-to
Content
So, you could do:
 exc = self.assertRaises(ValueError, somefunc, someargs)
And then, explore "exc" as will. 
Yes, you can get the exception if you use assertRaises as a context manager, but that leads to more cumbersome code:
 with self.assertRaises(ValueError) as cm:
 somefunc(someargs)
 exc = cm.exception
History
Date User Action Args
2016年09月13日 20:12:11facundobatistasetrecipients: + facundobatista
2016年09月13日 20:12:11facundobatistasetmessageid: <1473797531.08.0.417014131559.issue28135@psf.upfronthosting.co.za>
2016年09月13日 20:12:11facundobatistalinkissue28135 messages
2016年09月13日 20:12:11facundobatistacreate

AltStyle によって変換されたページ (->オリジナル) /