File: test_init.py

package info (click to toggle)
python-uart-devices 0.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 320 kB
  • sloc: python: 107; makefile: 17; sh: 5
file content (14 lines) | stat: -rw-r--r-- 310 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import pytest

from uart_devices import BluetoothDevice, NotAUARTDeviceError, UARTDevice


def test_bluetooth_device():
    assert BluetoothDevice(0)
    assert BluetoothDevice(1)


def test_uart_device():
    assert UARTDevice("serial0-0")
    with pytest.raises(NotAUARTDeviceError):
        UARTDevice("x")