def _TestPyVariantFails(o, is_generated, val, exc):
    try:
        _TestPyVariant(o, is_generated, val)
        raise error(("Setting %r didn't raise %s" % (val, exc)))
    except exc:
        pass
def _TestPyVariantFails(o, is_generated, val, exc):
    try:
        _TestPyVariant(o, is_generated, val)
        raise error(("Setting %r didn't raise %s" % (val, exc)))
    except exc:
        pass