Message84627
| Author |
pitrou |
| Recipients |
benjamin.peterson, giampaolo.rodola, gpolo, gregory.p.smith, gvanrossum, pitrou, pupeno, purcell, rhettinger, skip.montanaro |
| Date |
2009年03月30日.19:51:49 |
| SpamBayes Score |
8.6566395e-08 |
| Marked as misclassified |
No |
| Message-id |
<1238442792.6888.59.camel@fsol> |
| In-reply-to |
<ca471dc20903301247v1e45776ej1b0110dce714833a@mail.gmail.com> |
| Content |
> > Wouldn't it be simpler to make assertRaises return the exception and let
> > the calling code match it as it feels like?
>
> Hm, that sounds awfully familiar. I can't recall if there was ever a
> good reason not to do this.
IIRC some people felt that having a function named "assertSomething"
return something other None wasn't "pure".
The other reason is that you couldn't get the raised exception in a very
practical way if used as a context manager.
> > (or, at least, find a shorter name than assertRaisesWithRegexpMatch :-))
>
> assertRaisesRegex?
Sounds better! |
|