Testing methods fail?

Bernhard Herzog bh at intevation.de
Mon Oct 4 18:41:06 CEST 2004


Martin Schulze <joey at infodrom.org> writes:

> Is there something as an easy way to test for a comparison to fail
> without the surrounding test rountine failing?  Something like
> self.FailIfNotFail(self.MethodToFail(arg1, arg2))?

I'm not sure what you mean exactly, but if you expect
self.MethodToFail(arg1, arg2) to raise an exception you can test for
that with assertRaises .

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Skencil                                http://sketch.sourceforge.net/
Thuban                                  http://thuban.intevation.org/




More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)