Message84627
> > 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! |
|
Date |
User |
Action |
Args |
2009-03-30 19:51:51 | pitrou | set | recipients:
+ pitrou, gvanrossum, skip.montanaro, rhettinger, gregory.p.smith, purcell, giampaolo.rodola, pupeno, benjamin.peterson, gpolo |
2009-03-30 19:51:49 | pitrou | link | issue2578 messages |
2009-03-30 19:51:49 | pitrou | create | |
|