[Mapserver-users] MapScript Tests: Argument Error in testShapeCopy
Jan Schüngel
jschuengel at intevation.de
Wed May 19 06:57:14 PDT 2004
Sean Gillies schrieb:
> On May 19, 2004, at 5:00 AM, Jan Schüngel wrote:
>
>> Hi
>>
>> during the Test i get the following error:
>>
>> ERROR: testShapeCopy (__main__.ShapePointTestCase)
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>> File "tests/testMapScript.py", line 704, in testShapeCopy
>> s = self.copyShape(self.shape)
>> File "tests/testMapScript.py", line 682, in copyShape
>> return shape.copy()
>> File "build/lib.linux-i686-2.3/mapscript.py", line 211, in copy
>> def copy(*args): return apply(_mapscript.shapeObj_copy,args)
>> TypeError: shapeObj_copy() takes exactly 2 arguments (1 given)
>> r:
>>
>> is the test wrong or whats the problem here ??
>
>
> Jan,
>
> I think I have written the test improperly. I am not seeing problems
> because I am using the next generation API. Starting on line 677 of
> the test script, the ShapeObjTestCase should be changed to
>
> class ShapeObjTestCase(MapPrimitivesTestCase):
> """Base class for shapeObj tests"""
>
> def copyShape(self, shape):
> """Try to copy using next generation API, else fall back to
> standard API"""
> try:
> return shape.copy()
> except TypeError:
> s = mapscript.shapeObj(shape.type)
> shape.copy(s)
> return s
> except:
> raise
>
> Please reply when you try this and I'll make sure the change gets
> into the final 4.2 release.
>
> cheers,
> Sean
>
> --
> Sean Gillies
> sgillies at frii dot com
> http://users.frii.com/sgillies
>
Hi
the version works fine
Jan
More information about the MapServer-users
mailing list