Path: blob/main/tests/netedit/elements/additionals/access/trainstop/inspect/lane/test.py
169780 views
#!/usr/bin/env python1# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2# Copyright (C) 2009-2025 German Aerospace Center (DLR) and others.3# This program and the accompanying materials are made available under the4# terms of the Eclipse Public License 2.0 which is available at5# https://www.eclipse.org/legal/epl-2.0/6# This Source Code may also be made available under the following Secondary7# Licenses when the conditions for such availability set forth in the Eclipse8# Public License 2.0 are satisfied: GNU General Public License, version 29# or later which is available at10# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later1213# @file test.py14# @author Pablo Alvarez Lopez15# @date 2016-11-251617# import common functions for netedit tests18import os19import sys2021sys.path.append(os.path.join(os.environ.get("SUMO_HOME", "."), "tools"))22import neteditTestFunctions as netedit # noqa2324# Open netedit25neteditProcess, referencePosition = netedit.setupAndStart()2627# go to additional mode28netedit.changeMode("additional")2930# select TrainStop31netedit.changeElement("additionalFrame", "trainStop")3233# create TrainStop with default parameters34netedit.leftClick(referencePosition, netedit.positions.elements.edgeCenter1)3536# select Access37netedit.changeElement("additionalFrame", "access")3839# Create two Access40netedit.selectAdditionalChild(netedit.attrs.access.create.parent, 0)41netedit.leftClick(referencePosition, netedit.positions.elements.edge1Ped)42netedit.leftClick(referencePosition, netedit.positions.elements.edge2Ped)4344# go to inspect mode45netedit.changeMode("inspect")4647# inspect Access48netedit.leftClick(referencePosition, netedit.positions.elements.edge1Ped)4950# Change parameter lane with a non valid value (dummy Lane)51netedit.modifyAttributeOverlapped(netedit.attrs.access.inspect.lane, "dummyLane")5253# Change parameter lane with a non valid value (Empty lane)54netedit.modifyAttributeOverlapped(netedit.attrs.access.inspect.lane, "")5556# Change parameter lane with a non valid value (There is another Access in the same edge)57netedit.modifyAttributeOverlapped(netedit.attrs.access.inspect.lane, "E1_0")5859# Change parameter lane with a valid value (other lane)60netedit.modifyAttributeOverlapped(netedit.attrs.access.inspect.lane, "E4_0")6162# Check undo redo63netedit.checkUndoRedo(referencePosition)6465# save netedit config66netedit.saveExistentFile("neteditConfig")6768# set friendlyPos69netedit.typeKey("space")7071# quit netedit72netedit.quit(neteditProcess)737475