Skip to content

Commit

Permalink
Add getter/setter tests for classObj (#5928)
Browse files Browse the repository at this point in the history
  • Loading branch information
geographika authored Nov 26, 2019
1 parent 0af5737 commit 528f36d
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions mapscript/python/tests/cases/class_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down

0 comments on commit 528f36d

Please sign in to comment.