[Python-Dev] Unittest PEP do's and don'ts (BDFL pronouncement)

Tres Seaver tseaver at palladion.com
Thu Jul 17 19:21:24 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ron Adam wrote:
>> Nick Coghlan wrote:

>> The essence of the function remains unchanged - you're still asserting 
>> that a particular exception is raised. Returning the actual exception 
>> object that was caught is merely a convenience that makes a lot of sense.
>> I'm not sure I understand...
>> If "a particular exception is raised", every thing is good and there is no 
> error to report. ie... the code being tested did the right thing.

I *think* that in this case the propoent wants to be able to make
further assertions about the raised exception (e.g., to test its message).
Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIf3+T+gerLs4ltQ4RAk/VAKCK8hnX2C7DE57RSxA88THttT5tSwCg2taQ
zzRkJ/SEPwZvgfcluo2DTvw=
=KTGx
-----END PGP SIGNATURE-----


More information about the Python-Dev mailing list

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