def testWriteWrongValue16Constraint(self):
    value16 = self.VALUE16_WRONG_CONSTRAINT
    unionConstraints = self.api.UnionConstraints()
    unionConstraints.setValue16(value16)
    writer = zserio.BitStreamWriter()
    with self.assertRaises(zserio.PythonRuntimeException):
        unionConstraints.write(writer)
def testWriteWrongValue16Constraint(self):
    value16 = self.VALUE16_WRONG_CONSTRAINT
    unionConstraints = self.api.UnionConstraints()
    unionConstraints.setValue16(value16)
    writer = zserio.BitStreamWriter()
    with self.assertRaises(zserio.PythonRuntimeException):
        unionConstraints.write(writer)