bernhard: thuban/Extensions/svgexport/test test_svgmapwriter.py, 1.11, 1.12

Bernhard Reiter bernhard at intevation.de
Mon Dec 13 16:50:31 CET 2004


On Mon, Dec 13, 2004 at 03:57:53PM +0100, Bernhard Herzog wrote:
> cvs at intevation.de writes:

> > +    def setUp(self):
> > +        super(TestDrawSplines,self).setUp()
> 
> I get errors at this point when running the tests with Python 2.2.1 (the
> oldest python version supported by Thuban):
> 
>   File "../Extensions/svgexport/test/test_svgmapwriter.py", line 191, in setUp
>     super(TestDrawSplines,self).setUp()
> TypeError: super() argument 1 must be type, not class
> 
> The builtin super only works with new-style classes.  In Python 2.3,
> unittest.TestCase and other classes in unittest are new-style classes,
> but in 2.2 they are still "old-style" classes.
> 
> I'll change this line to the backwards compatible
> 
>   TestVirtualDC.setUp(self)

Thanks for noticing, 
I had checked that super was available with 2.2,
but missed the old-styleness of the test classes.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20041213/2a6f776c/attachment.bin


More information about the Thuban-devel mailing list

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