neteditTestRoot = os.path.join( os.environ.get('TEXTTEST_HOME', testRoot), 'netedit') sys.path.append(neteditTestRoot) import neteditTestFunctions as netedit # noqa # Open netedit neteditProcess, match = netedit.setupAndStart(neteditTestRoot) # Rebuild network netedit.rebuildNetwork() # go to select mode netedit.selectMode() # use a rectangle to select central elements netedit.selectionRectangle(match, 250, 150, 400, 300) # remove elements netedit.deleteSelectedItems() # check undo redo netedit.undo(match, 1) netedit.redo(match, 1) # undo deletion again (all must be selected) netedit.undo(match, 1) # save additionals netedit.saveAdditionals() # save newtork
import neteditTestFunctions as netedit # noqa # Open netedit neteditProcess, match = netedit.setupAndStart(neteditTestRoot) # first rebuild network netedit.rebuildNetwork() # go to select mode netedit.selectMode() # show connections netedit.toogleShowConnections() # use a rectangle to check add mode netedit.selectionRectangle(match, 50, 50, 500, 400) # clear selection netedit.selectionClear() # lock junctions netedit.lockSelection(1) # use a rectangle to check add mode netedit.selectionRectangle(match, 50, 50, 500, 400) # clear selection netedit.selectionClear() # lock edges netedit.lockSelection(2)