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 r.david.murray
Recipients michael.foord, r.david.murray
Date 2012年04月20日.20:38:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1334954289.59.0.991318648825.issue14636@psf.upfronthosting.co.za>
In-reply-to
Content
I just spent an hour figuring out why my test was failing because I tried to do this:
 mymock.side_effect = (AuthenticationError, None)
expecting the first call to raise an auth error and the second time it was called to get a normal return.
Since there are almost zero circumstances in which one would really want to return an exception, is there any reason not to have mock check for exceptions and raise them in this circumstance? (If one did need to return an exception one could write a function...which is what one has to do now for the above case, but the above case seems more commonly needed than returning an exception would be.)
History
Date User Action Args
2012年04月20日 20:38:09r.david.murraysetrecipients: + r.david.murray, michael.foord
2012年04月20日 20:38:09r.david.murraysetmessageid: <1334954289.59.0.991318648825.issue14636@psf.upfronthosting.co.za>
2012年04月20日 20:38:09r.david.murraylinkissue14636 messages
2012年04月20日 20:38:08r.david.murraycreate

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