Skip to content

Commit 2013732

Browse files
committed
fixup! riotctrl_ctrl: add tests for NativeRIOTCtrl
1 parent 05abcb6 commit 2013732

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

dist/pythonlibs/riotctrl_ctrl/tests/test_native.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
import os.path
88

9+
import riotctrl.ctrl
10+
911
import riotctrl_ctrl.native
1012

1113

@@ -29,3 +31,15 @@ def test_reset():
2931
ctrl.reset()
3032
ctrl.term.expect_exact('!! REBOOT !!')
3133
ctrl.term.expect_exact('Hello World!')
34+
35+
36+
def test_w_factory():
37+
env = {'BOARD': 'native'}
38+
factory = riotctrl.ctrl.RIOTCtrlBoardFactory(
39+
board_cls={'native': riotctrl_ctrl.native.NativeRIOTCtrl}
40+
)
41+
assert 'native' in factory.board_cls
42+
ctrl = factory.get_ctrl(env=env)
43+
# pylint: disable=unidiomatic-typecheck
44+
# in this case we want to know the exact type
45+
assert type(ctrl) is riotctrl_ctrl.native.NativeRIOTCtrl

0 commit comments

Comments
 (0)