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
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