Introduce hid_parser tests

Add basic tests to cover the package.
This commit is contained in:
MattHag 2024-09-14 23:43:50 +02:00 committed by Peter F. Patel-Schneider
parent 8fb087be14
commit 40033c0183
2 changed files with 15 additions and 0 deletions

View File

View File

@ -0,0 +1,15 @@
from hid_parser.data import Button
from hid_parser.data import Consumer
def test_consumer():
consumer = Consumer()
assert consumer.PLAY_PAUSE == 0xCD
def test_button():
button = Button()
assert button.NO_BUTTON == 0x0
assert button.BUTTON_1 == 0x1