a | b/python/tests/test_emokit.py | ||
---|---|---|---|
1 | # -*- encoding: utf-8 -*- |
||
2 | |||
3 | from emokit.emotiv import Emotiv |
||
4 | |||
5 | |||
6 | def test_emotiv_no_headset(): |
||
7 | try: |
||
8 | emo_test = Emotiv() |
||
9 | except Exception as ex: |
||
10 | assert (ex.message == "Device not found") |
||
11 | |||
12 | |||
13 | def test_import_hidapi(): |
||
14 | hidapi_found = False |
||
15 | try: |
||
16 | import hidapi |
||
17 | hidapi_found = True |
||
18 | except Exception as ex: |
||
19 | pass |
||
20 | try: |
||
21 | import pywinusb.hid |
||
22 | hidapi_found = True |
||
23 | except Exception as ex: |
||
24 | pass |
||
25 | assert hidapi_found |