Notes on unittest.py

Thomas Heller thomas.heller at ion-tof.com
Mon Oct 23 07:39:12 EDT 2000


[I wrote]
> You could also use the assertRaises() method in pyunit:
> 
> def check_something_exception(self):
>     self.assertRaises(TheExceptionIThinkItWillRaise, "self.mything", (-1,))
> 
but this should have been:

def check_something_exception(self):
    self.assertRaises(TheExceptionIThinkItWillRaise, self.mything, -1)

Thomas





More information about the Python-list mailing list