| Total Complexity | 3 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | # -*- coding:utf-8 -*- |
||
| 2 | """ |
||
| 3 | Test for _button_data_extractor() function |
||
| 4 | """ |
||
| 5 | import os |
||
| 6 | import sys |
||
| 7 | |||
| 8 | sys.path.insert(0, "%s/../" % os.path.dirname(os.path.abspath(__file__))) |
||
| 9 | |||
| 10 | import pytest |
||
| 11 | |||
| 12 | from keyboa.keyboards import _button_data_extractor |
||
| 13 | |||
| 14 | |||
| 15 | def test_button_data_extractor(): |
||
| 16 | with pytest.raises(TypeError) as _: |
||
| 17 | _button_data_extractor(True) |
||
| 18 | |||
| 19 | with pytest.raises(TypeError) as _: |
||
| 20 | _button_data_extractor((1, {"wrong": "text", })) |
||
| 21 |