tests/test_init.py
raw| 1 | import pytest |
| 2 | |
| 3 | from uart_devices import BluetoothDevice, NotAUARTDeviceError, UARTDevice |
| 4 | |
| 5 | |
| 6 | def test_bluetooth_device(): |
| 7 | assert BluetoothDevice(0) |
| 8 | assert BluetoothDevice(1) |
| 9 | |
| 10 | |
| 11 | def test_uart_device(): |
| 12 | assert UARTDevice("serial0-0") |
| 13 | with pytest.raises(NotAUARTDeviceError): |
| 14 | UARTDevice("x") |