Author brian.curtin
Recipients brian.curtin, ezio.melotti, jaime.buelta, lars.gustaebel, meador.inge, r.david.murray
Date 2010-02-28.01:21:04
SpamBayes Score 1.15216e-08
Marked as misclassified No
Message-id <1267320068.64.0.818897936076.issue7232@psf.upfronthosting.co.za>
In-reply-to
Content
Good point. How about version 5? It uses base Exception in the context manager, which will allow us to differentiate between no exception being raised, and the wrong one being raised. After the context manager, we check the type of the exception to make sure it's correct.

I changed the exception being raised to an IOError. It could be anything, but given that AssertionError is what gets raised by the assert functions, it seemed better to avoid that one specifically. This is fairly minor, though.

If you change the "raise IOError" to be a pass statement, or another type of exception, you can see that the same level of information is given to you as in patch version 3 by Lars.
History
Date User Action Args
2010-02-28 01:21:09brian.curtinsetrecipients: + brian.curtin, lars.gustaebel, ezio.melotti, r.david.murray, meador.inge, jaime.buelta
2010-02-28 01:21:08brian.curtinsetmessageid: <1267320068.64.0.818897936076.issue7232@psf.upfronthosting.co.za>
2010-02-28 01:21:07brian.curtinlinkissue7232 messages
2010-02-28 01:21:06brian.curtincreate