コード例 #1
0
ファイル: test.py プロジェクト: iltempe/osmosi
import sys

testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
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)

# go to shape mode
netedit.shapeMode()

# go to shape mode
netedit.changeShape("poi")

# create POI
netedit.leftClick(match, 150, 50)

# go to delete mode
netedit.deleteMode()

# delete created poi
netedit.leftClick(match, 150, 50)

# delete first stacked loaded POI (Second stacked must stay)
netedit.leftClick(match, 200, 50)

# Check undos and redos
netedit.undo(match, 2)
コード例 #2
0
import sys

testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
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)

# go to shape mode
netedit.shapeMode()

# select invalid shape (dummy)
netedit.changeShape("dummyShape")

# try to create an dummy shape
netedit.leftClick(match, 150, 50)

# select valid shape (POI)
netedit.changeShape("poi")

# create POI
netedit.leftClick(match, 150, 50)

# save shapes
netedit.saveShapes()

# save newtork
netedit.saveNetwork()
コード例 #3
0
import sys

testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
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)

# go to shape mode
netedit.shapeMode()

# go to poly mode and select poly
netedit.changeShape("poly")

# create polygon
netedit.createSquaredPoly(match, 100, 50, 100, True)

# go to delete mode
netedit.deleteMode()

# delete created polygon
netedit.leftClick(match, 100, 50)

# try to delete second polygon (not possible due isn't fill)
netedit.leftClick(match, 175, 25)

# delete loaded filled polygon
netedit.leftClick(match, 275, 25)
コード例 #4
0
import sys

testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests')
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)

# go to shape mode
netedit.shapeMode()

# go to shape mode
netedit.changeShape("poiLane")

# create poi
netedit.leftClick(match, 100, 100)

# change color to white (To see icon)
netedit.modifyShapeDefaultValue(3, "white")

# Change parameter 6 with a valid value (To see icon)
netedit.modifyAttribute(6, "10")

# Change parameter 6 with a valid value (To see icon)
netedit.modifyAttribute(7, "10")

# change imgfile (valid)
netedit.modifyShapeDefaultValue(8, "berlin_icon.ico")