SquishTests: More Python3 adaption

Change-Id: I95488e2b5661c8790cb73246947af58de2a1899b
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
Christian Stenger
2023-03-28 14:59:36 +02:00
parent 230b030755
commit 3ad00fc871
3 changed files with 3 additions and 3 deletions

View File

@@ -248,7 +248,7 @@ def verifyBreakPoint(bpToVerify):
windowTitle = str(waitForObject(":Qt Creator_Core::Internal::MainWindow").windowTitle)
test.verify(windowTitle.startswith(os.path.basename(fileName) + " "),
"Verify that Creator's window title changed according to current file")
return test.compare(line, bpToVerify.values()[0],
return test.compare(line, list(bpToVerify.values())[0],
"Compare hit breakpoint to expected line number in %s" % fileName)
else:
test.fatal("Expected a dict for bpToVerify - got '%s'" % className(bpToVerify))

View File

@@ -157,7 +157,7 @@ def __handleTextTips__(textTip, expectedVals, alternativeVals):
props = object.properties(textTip)
expFail = False
eResult = verifyProperties(props, expectedVals)
for val in eResult.itervalues():
for val in eResult.values():
if not val:
expFail = True
break

View File

@@ -58,7 +58,7 @@ def checkOrUncheckMyTasks():
"My Tasks"))
def getBuildIssuesTypeCounts(model):
issueTypes = map(lambda x: x.data(Qt.UserRole + 5).toInt(), dumpIndices(model))
issueTypes = list(map(lambda x: x.data(Qt.UserRole + 5).toInt(), dumpIndices(model)))
result = [issueTypes.count(0), issueTypes.count(1), issueTypes.count(2)]
if len(issueTypes) != sum(result):
test.fatal("Found unexpected value(s) for TaskType...")