def testReadWrongValue8Constraint(self):
    value8 = self.VALUE8_WRONG_CONSTRAINT
    writer = zserio.BitStreamWriter()
    self._writeValue8(writer, value8)
    reader = zserio.BitStreamReader(writer.getByteArray())
    unionConstraints = self.api.UnionConstraints()
    with self.assertRaises(zserio.PythonRuntimeException):
        unionConstraints.read(reader)
def testReadWrongValue8Constraint(self):
    value8 = self.VALUE8_WRONG_CONSTRAINT
    writer = zserio.BitStreamWriter()
    self._writeValue8(writer, value8)
    reader = zserio.BitStreamReader(writer.getByteArray())
    unionConstraints = self.api.UnionConstraints()
    with self.assertRaises(zserio.PythonRuntimeException):
        unionConstraints.read(reader)