[Python-Dev] assertRaises (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Thu Jul 17 11:12:59 CEST 2008
- Previous message: [Python-Dev] Unittest PEP do's and don'ts (BDFL pronouncement)
- Next message: [Python-Dev] assertRaises
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Fred Drake <fdrake acm.org> writes:
Sounds like adding a new method, catchException(...), that returns the exception it catches, would be a reasonable compromise. I can't think of any reason that the method that catches-and-returns needs to be the existing API, which does something different.
So you'd have a method that just catches (assertRaises), and another one that catches-and-returns (catchException)? It doesn't seem very practical to have two different methods based on such a small and trivial difference. Let's just make assertRaises return the exception instance, it seems like it feels the need correctly.
- Previous message: [Python-Dev] Unittest PEP do's and don'ts (BDFL pronouncement)
- Next message: [Python-Dev] assertRaises
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]