def test_illegal_version():
    try:
        builder.QRCodeBuilder('123', version=41, mode='numeric', error='M')
        raise Exception('Expected an error for illegal mode')
    except __HOLE__ as ex:
        ok_('41' in str(ex))
dataset/ETHPy150Open mnooner256/pyqrcode/tests/test_builder.py/test_illegal_version