Skip to content
Permalink
Browse files
Add getter/setter tests for classObj (#5928)
  • Loading branch information
geographika committed Nov 26, 2019
1 parent 0af5737 commit 528f36d3f209e79e14a47f0dc9bdaedb1aa26b38
Showing 1 changed file with 41 additions and 0 deletions.
@@ -45,6 +45,47 @@ def testConstructorWithArg(self):
assert c.layer.name == lyr.name
assert c.numstyles == 0

def testGetSetAttributes(self):
c = mapscript.classObj()

val = '/tmp/legend.png'
c.keyimage = val
assert c.keyimage == val

c.debug = mapscript.MS_TRUE
assert c.debug == mapscript.MS_TRUE

val = 'Group1'
c.group = val
assert c.group == val

val = 10000
c.maxscaledenom = val
assert c.maxscaledenom == val

val = 3
c.minfeaturesize = val
assert c.minfeaturesize == val

val = 1000
c.minscaledenom = val
assert c.minscaledenom == val

val = 'Class1'
c.name = val
assert c.name == val

c.status = mapscript.MS_OFF
assert c.status == mapscript.MS_OFF

val = 'template.html'
c.template = val
assert c.template == val

val = 'Title1'
c.title = val
assert c.title == val


class ClassCloningTestCase(unittest.TestCase):

0 comments on commit 528f36d

Please sign in to comment.