winIDEA SDK
test_create_stub.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5import isystem.connect as ic
6
7
8winidea_id = ''
9
10
11def test_createStub():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 tcCtrl = ic.CTestCaseController(connMgr, "main", "")
16
17 print("Creating 'target_init' function stub...")
18 stub1 = tcCtrl.createStub("target_init")
19 print(f"\tStub name: {stub1.getStubName()}")
20 print(f"\tHandle ID: {stub1.getHandle()}")
21
22 tcCtrl.init()
23 tcCtrl.destroy()
24
25
26if __name__ == "__main__":
27 test_createStub()