From 7901601eb0d03cba1d665e05dd4bf7a580b2a963 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 9 Jul 2015 15:25:44 +0200 Subject: [PATCH] Squish: Simplify __selectTreeItemOnBuildAndRun__() Change-Id: If1bc3f610cd59041fb4e6ce9edd38354f73b141d Reviewed-by: Robert Loehning --- tests/system/shared/project_explorer.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/system/shared/project_explorer.py b/tests/system/shared/project_explorer.py index 0a7bd0e36ea..c68633af22f 100644 --- a/tests/system/shared/project_explorer.py +++ b/tests/system/shared/project_explorer.py @@ -217,19 +217,15 @@ def __selectTreeItemOnBuildAndRun__(treeViewOrWidget, itemText, isRegex=False): test.compare(manual.data().toString(), "Manual", "Verifying label for section") if isRegex: pattern = re.compile(itemText) - found = False for section in [autoDetected, manual]: for dumpedItem in dumpItems(model, section): if (isRegex and pattern.match(dumpedItem) or itemText == dumpedItem): - found = True item = ".".join([str(section.data().toString()), dumpedItem.replace(".", "\\.").replace("_", "\\_")]) clickItem(treeViewOrWidget, item, 5, 5, 0, Qt.LeftButton) - break - if found: - break - return found + return True + return False def __getTargetFromToolTip__(toolTip): if toolTip == None or not isinstance(toolTip, (str, unicode)):