Skip to content

Commit ab3fbfa

Browse files
Merge pull request #159 from ericpassmore/master
Migrate tests to ledgered 'Devices' per Ragger v1.35.0
2 parents 4caa2e9 + dd390ae commit ab3fbfa

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

tests/setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ ignore_missing_imports = True
2121

2222
[mypy-pytest.*]
2323
ignore_missing_imports = True
24+
25+
[mypy-ledgered.*]
26+
ignore_missing_imports = True

tests/test_app_mainmenu.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
from ragger.firmware import Firmware
1+
from ledgered.devices import Device, DeviceType
22
from ragger.navigator import Navigator, NavInsID, NavIns
33

44

55
# In this test we check the behavior of the device main menu
6-
def test_app_mainmenu(firmware: Firmware,
6+
def test_app_mainmenu(device: Device,
77
navigator: Navigator,
88
test_name: str,
99
default_screenshot_path: str) -> None:
1010
# Navigate in the main menu
1111
instructions = []
12-
if firmware.is_nano:
12+
if device.is_nano:
1313
instructions += [
1414
NavInsID.RIGHT_CLICK,
1515
NavInsID.BOTH_CLICK,
@@ -28,7 +28,7 @@ def test_app_mainmenu(firmware: Firmware,
2828
NavInsID.BOTH_CLICK,
2929
NavInsID.RIGHT_CLICK,
3030
]
31-
elif firmware is Firmware.STAX:
31+
elif device.type == DeviceType.STAX:
3232
instructions += [
3333
NavInsID.USE_CASE_HOME_SETTINGS,
3434
NavIns(NavInsID.TOUCH, (200, 113)),
@@ -38,7 +38,7 @@ def test_app_mainmenu(firmware: Firmware,
3838
NavInsID.USE_CASE_SETTINGS_NEXT,
3939
NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT
4040
]
41-
elif firmware is Firmware.FLEX:
41+
elif device.type is DeviceType.FLEX:
4242
instructions += [
4343
NavInsID.USE_CASE_HOME_SETTINGS,
4444
NavIns(NavInsID.TOUCH, (200, 113)),

0 commit comments

Comments
 (0)