5import isystem.connect
as ic
11def test_hotAttachDetach():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
15 execCtrl = ic.CExecutionController(connMgr)
17 sess_ctrl = ic.CSessionCtrl(connMgr)
18 sess_ctrl.begin_prepare()
20 if execCtrl.hotDetach() == 0:
21 print(f
"Hot detach succeeded, winIDEA is in `detached` state.")
23 if execCtrl.hotAttach() == 0:
24 print(f
"Hot attach succeeded, winIDEA is connected.")
27if __name__ ==
"__main__":
28 test_hotAttachDetach()