Пример #1
0
 def testParameterExtent(self):
     param = ParameterExtent("name", "desc")
     assert not param.setValue("0,2,0")
     assert not param.setValue("0,2,0,a")
     assert not param.setValue("0,2,2,4")
     assert param.value == "0,2,2,4"
     assert param.setValue(None)
     assert param.value == param.default
     s = param.serialize()
     param2 = ParameterExtent()
     param2.deserialize(s)
     assert param.default == param2.default
     assert param.description == param2.description
     assert param.name == param2.name
Пример #2
0
 def testParameterExtent(self):
     param = ParameterExtent('name', 'desc')
     assert not param.setValue('0,2,0')
     assert not param.setValue('0,2,0,a')
     assert not param.setValue('0,2,2,4')
     assert param.value == '0,2,2,4'
     assert param.setValue(None)
     assert param.value == param.default
     s = param.serialize()
     param2 = ParameterExtent()
     param2.deserialize(s)
     assert param.default == param2.default
     assert param.description == param2.description
     assert param.name == param2.name