From f0762b45922cf262322df863aa4091fe6db42f07 Mon Sep 17 00:00:00 2001 From: geographika Date: Mon, 19 Mar 2018 14:22:08 +0100 Subject: [PATCH] Use test path. IOError no longer raised. --- mapscript/python/tests/cases/symboltest.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mapscript/python/tests/cases/symboltest.py b/mapscript/python/tests/cases/symboltest.py index 008b908344..33bcaadd29 100644 --- a/mapscript/python/tests/cases/symboltest.py +++ b/mapscript/python/tests/cases/symboltest.py @@ -55,8 +55,9 @@ def testConstructorImage(self): """create new instance of symbolObj from an image""" symbol = mapscript.symbolObj('xmarks', XMARKS_IMAGE) assert symbol.name == 'xmarks' - assert symbol.type == mapscript.MS_SYMBOL_PIXMAP - format = mapscript.outputFormatObj('GD/PNG') + print(symbol.type) + assert symbol.type == mapscript.MS_SYMBOL_PIXMAP # now MS_SYMBOL_VECTOR? MS_SYMBOL_VECTOR + format = mapscript.outputFormatObj('AGG/PNG') img = symbol.getImage(format) img.save('sym-%s.%s' % (symbol.name, img.format.extension)) @@ -83,7 +84,7 @@ def testSetPCTImage(self): """set image of new symbolObj""" assert self.h_symbol.name == 'house' assert self.h_symbol.type == mapscript.MS_SYMBOL_PIXMAP - format = mapscript.outputFormatObj('GD/PNG') + format = mapscript.outputFormatObj('AGG/PNG') format.transparent = mapscript.MS_ON img = self.h_symbol.getImage(format) img.save('set-%s.%s' % (self.h_symbol.name, img.format.extension)) @@ -105,7 +106,7 @@ def testSetRGBAImage(self): """set image of new symbolObj""" assert self.x_symbol.name == 'xmarks' assert self.x_symbol.type == mapscript.MS_SYMBOL_PIXMAP - format = mapscript.outputFormatObj('GD/PNG') + format = mapscript.outputFormatObj('AGG/PNG') img = self.x_symbol.getImage(format) img.save('set-%s.%s' % (self.x_symbol.name, img.format.extension)) @@ -148,7 +149,7 @@ def testSetPoints(self): def testSetStyle(self): """expect success after setting an existing symbol's style""" symbol = self.map.symbolset.getSymbol(1) - assert symbol.setPattern(0, 1) == mapscript.MS_SUCCESS + assert symbol.setPoints(0, 1) == mapscript.MS_SUCCESS def testRGBASymbolInPNG24(self): """draw a RGBA PNG pixmap on PNG canvas"""