winIDEA SDK
Loading...
Searching...
No Matches
test_close.py
# This script is licensed under BSD License, see file LICENSE.txt, or search for `License` in the SDK online help.
#
# (c) TASKING Germany GmbH, 2023
import isystem.connect as ic
winidea_id = ''
def test_close():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
DOC_NAME = "test_close.trd"
covCtrl = ic.CCoverageController2(connMgr, DOC_NAME, "w")
covCtrl.reset(ic.IConnectIDE.drContent)
print(f"Document '{DOC_NAME}' reset was performed with scope: 'ic.IConnectIDE.drContent'")
covCtrl.close()
print(f"Document '{DOC_NAME}' closed. No user prompt will be issued, since no change was made.")
covCtrl = ic.CCoverageController2(connMgr, DOC_NAME, "w")
covCtrl.closeDiscard()
print(f"Document '{DOC_NAME}' was closed, discarding any changes.")
covCtrl = ic.CCoverageController2(connMgr, DOC_NAME, "w")
covCtrl.closeAll()
print(f"Document '{DOC_NAME}' and all others were closed.")
if __name__ == "__main__":
test_close()