xref: /OK3568_Linux_fs/buildroot/support/testing/tests/package/sample_python_rpi_gpio.py (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1try:
2    import RPi.GPIO  # noqa
3except RuntimeError as e:
4    assert(str(e) == 'This module can only be run on a Raspberry Pi!')
5else:
6    raise RuntimeError('Import succeeded when it should not have!')
7