aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2018-08-02 13:45:34 +0200
committerRobert Loehning <robert.loehning@qt.io>2018-08-06 14:21:30 +0000
commitff10f8c3a58c2c57e221e294d5c4829c3fd05c15 (patch)
treec8db8d36d315effe5b7fb3403d32f13416281352 /tests
parentc1f78335e005b311ce3eac94ca48cc573f50a56d (diff)
Squish: Fix warnings
Warnings from static code checks, that is, not test.warning() at runtime. Change-Id: I651d13491106583908059ecdb5f700f539b6d9c8 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/system/shared/build_utils.py2
-rw-r--r--tests/system/shared/classes.py1
-rw-r--r--tests/system/shared/debugger.py6
-rw-r--r--tests/system/shared/editor_utils.py7
-rw-r--r--tests/system/shared/project_explorer.py4
-rw-r--r--tests/system/shared/utils.py4
-rw-r--r--tests/system/suite_APTW/tst_APTW03/test.py2
-rw-r--r--tests/system/suite_CSUP/tst_CSUP04/test.py2
-rw-r--r--tests/system/suite_CSUP/tst_CSUP05/test.py2
-rwxr-xr-xtests/system/suite_HELP/tst_HELP06/test.py2
-rw-r--r--tests/system/suite_QMLS/tst_QMLS02/test.py2
-rw-r--r--tests/system/suite_QMLS/tst_QMLS03/test.py6
-rw-r--r--tests/system/suite_QMLS/tst_QMLS04/test.py2
-rw-r--r--tests/system/suite_QMLS/tst_QMLS05/test.py4
-rw-r--r--tests/system/suite_QMLS/tst_QMLS06/test.py4
-rw-r--r--tests/system/suite_QMLS/tst_QMLS07/test.py2
-rw-r--r--tests/system/suite_QMLS/tst_QMLS08/test.py2
-rw-r--r--tests/system/suite_debugger/tst_qml_js_console/test.py3
-rw-r--r--tests/system/suite_debugger/tst_qml_locals/test.py2
-rw-r--r--tests/system/suite_editors/tst_qml_indent/test.py1
-rw-r--r--tests/system/suite_editors/tst_rename_macros/test.py2
-rw-r--r--tests/system/suite_general/tst_build_speedcrunch/test.py1
-rw-r--r--tests/system/suite_general/tst_create_proj_wizard/test.py1
-rw-r--r--tests/system/suite_general/tst_default_settings/test.py2
-rw-r--r--tests/system/suite_qtquick/tst_qml_outline/test.py6
-rw-r--r--tests/system/suite_qtquick/tst_qtquick_creation/test.py1
-rw-r--r--tests/system/suite_tools/tst_git_local/test.py4
27 files changed, 33 insertions, 44 deletions
diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py
index d2d1f59600..0aaab2ac33 100644
--- a/tests/system/shared/build_utils.py
+++ b/tests/system/shared/build_utils.py
@@ -37,7 +37,7 @@ def getBuildIssues():
def checkLastBuild(expectedToFail=False, createTasksFileOnError=True):
try:
# can't use waitForObject() 'cause visible is always 0
- buildProg = findObject("{type='ProjectExplorer::Internal::BuildProgress' unnamed='1' }")
+ findObject("{type='ProjectExplorer::Internal::BuildProgress' unnamed='1' }")
except LookupError:
test.log("checkLastBuild called without a build")
return
diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py
index c4db7046e2..a8bdbf9664 100644
--- a/tests/system/shared/classes.py
+++ b/tests/system/shared/classes.py
@@ -24,7 +24,6 @@
############################################################################
import __builtin__
-import operator
# for easier re-usage (because Python hasn't an enum type)
class Targets:
diff --git a/tests/system/shared/debugger.py b/tests/system/shared/debugger.py
index b3cf7988a9..1a1fc39a56 100644
--- a/tests/system/shared/debugger.py
+++ b/tests/system/shared/debugger.py
@@ -23,8 +23,6 @@
#
############################################################################
-import re
-
def handleDebuggerWarnings(config, isMsvcBuild=False):
if isMsvcBuild:
try:
@@ -71,8 +69,8 @@ def setBreakpointsForCurrentProject(filesAndLines):
if not filesAndLines or not isinstance(filesAndLines, (list,tuple)):
test.fatal("This function only takes a non-empty list/tuple holding dicts.")
return False
- navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' "
- "window=':Qt Creator_Core::Internal::MainWindow'}")
+ waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' "
+ "window=':Qt Creator_Core::Internal::MainWindow'}")
for current in filesAndLines:
for curFile,curLine in current.iteritems():
if not openDocument(curFile):
diff --git a/tests/system/shared/editor_utils.py b/tests/system/shared/editor_utils.py
index 09b3af6ae7..df3f7d37ea 100644
--- a/tests/system/shared/editor_utils.py
+++ b/tests/system/shared/editor_utils.py
@@ -106,7 +106,7 @@ def openContextMenuOnTextCursorPosition(editor):
# param direction is one of "Left", "Right", "Up", "Down", but "End" and combinations work as well
# param typeCount defines how often the cursor will be moved in the given direction (while marking)
def markText(editor, direction, typeCount=1):
- for i in range(typeCount):
+ for _ in range(typeCount):
type(editor, "<Shift+%s>" % direction)
# works for all standard editors
@@ -173,7 +173,7 @@ def verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, e
# param expectedVals a dict holding property value pairs that must match
def __handleTextTips__(textTip, expectedVals, alternativeVals):
props = object.properties(textTip)
- expFail = altFail = False
+ expFail = False
eResult = verifyProperties(props, expectedVals)
for val in eResult.itervalues():
if not val:
@@ -182,7 +182,6 @@ def __handleTextTips__(textTip, expectedVals, alternativeVals):
if expFail and alternativeVals != None:
aResult = verifyProperties(props, alternativeVals)
else:
- altFail = True
aResult = None
if not expFail:
test.passes("TextTip verified")
@@ -360,7 +359,7 @@ def invokeContextMenuItem(editorArea, command1, command2 = None):
def invokeFindUsage(editor, line, typeOperation, n=1):
if not placeCursorToLine(editor, line, True):
return False
- for i in range(n):
+ for _ in range(n):
type(editor, typeOperation)
snooze(1)
invokeContextMenuItem(editor, "Find Usages")
diff --git a/tests/system/shared/project_explorer.py b/tests/system/shared/project_explorer.py
index 336d82fc48..2ad9a32957 100644
--- a/tests/system/shared/project_explorer.py
+++ b/tests/system/shared/project_explorer.py
@@ -42,7 +42,7 @@ def switchViewTo(view):
text = ""
pattern = ViewConstants.getToolTipForViewTab(view)
if re.match(pattern, unicode(text), re.UNICODE):
- test.passes("ToolTip verified")
+ test.passes("ToolTip verified")
else:
test.warning("ToolTip does not match", "Expected pattern: %s\nGot: %s" % (pattern, text))
mouseClick(waitForObject("{type='Core::Internal::FancyTabBar' unnamed='1' visible='1' "
@@ -158,7 +158,7 @@ def addAndActivateKit(kit):
kitString = Targets.getStringForTarget(kit)
switchViewTo(ViewConstants.PROJECTS)
try:
- treeView = waitForObject(":Projects.ProjectNavigationTreeView")
+ waitForObject(":Projects.ProjectNavigationTreeView")
wanted = getQModelIndexStr("text='%s'" % kitString, bAndRIndex)
index = findObject(wanted)
if str(index.toolTip).startswith(clickToActivate):
diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py
index 590b277a1e..097772769d 100644
--- a/tests/system/shared/utils.py
+++ b/tests/system/shared/utils.py
@@ -458,7 +458,7 @@ def iterateQtVersions(keepOptionsOpen=False, alreadyOnOptionsDialog=False,
currResult = additionalFunction(target, version, *argsForAdditionalFunc)
except:
import sys
- t,v,tb = sys.exc_info()
+ t,v,_ = sys.exc_info()
currResult = None
test.fatal("Function to additionally execute on Options Dialog could not be found or "
"an exception occurred while executing it.", "%s(%s)" % (str(t), str(v)))
@@ -521,7 +521,7 @@ def iterateKits(keepOptionsOpen=False, alreadyOnOptionsDialog=False,
currResult = additionalFunction(item, kitName, *argsForAdditionalFunc)
except:
import sys
- t,v,tb = sys.exc_info()
+ t,v,_ = sys.exc_info()
currResult = None
test.fatal("Function to additionally execute on Options Dialog could not be "
"found or an exception occurred while executing it.", "%s(%s)" %
diff --git a/tests/system/suite_APTW/tst_APTW03/test.py b/tests/system/suite_APTW/tst_APTW03/test.py
index 022c1ba813..ca1378196a 100644
--- a/tests/system/suite_APTW/tst_APTW03/test.py
+++ b/tests/system/suite_APTW/tst_APTW03/test.py
@@ -98,7 +98,7 @@ def main():
test.fail("Could not open %s.h - continuing." % className.lower())
continue
editor = getEditorForFileSuffix("%s.h" % className.lower())
- oldContent = str(editor.plainText)
+ str(editor.plainText)
placeCursorToLine(editor, "class %s.*" % className, True)
snooze(4) # avoid timing issue with the parser
invokeContextMenuItem(editor, "Refactor", "Insert Virtual Functions of Base Classes")
diff --git a/tests/system/suite_CSUP/tst_CSUP04/test.py b/tests/system/suite_CSUP/tst_CSUP04/test.py
index e922281d4b..d6eaf7086e 100644
--- a/tests/system/suite_CSUP/tst_CSUP04/test.py
+++ b/tests/system/suite_CSUP/tst_CSUP04/test.py
@@ -70,7 +70,7 @@ def main():
openDocument("openglwindow.Sources.main\\.cpp")
if not placeCursorToLine(editorWidget, 'm_posAttr = m_program->attributeLocation("posAttr");'):
return
- for i in range(13):
+ for _ in range(13):
type(editorWidget, "<Left>")
type(editorWidget, "<Ctrl+Shift+u>")
# wait until search finished and verify search results
diff --git a/tests/system/suite_CSUP/tst_CSUP05/test.py b/tests/system/suite_CSUP/tst_CSUP05/test.py
index 466b77b5fb..0824ef48fd 100644
--- a/tests/system/suite_CSUP/tst_CSUP05/test.py
+++ b/tests/system/suite_CSUP/tst_CSUP05/test.py
@@ -76,7 +76,7 @@ def main():
# select some other word in .cpp file and select "Edit" -> "Find/Replace".
clickButton(waitForObject(":Qt Creator.CloseFind_QToolButton"))
placeCursorToLine(editorWidget, "void Trianglefind::render()")
- for i in range(10):
+ for _ in range(10):
type(editorWidget, "<Left>")
markText(editorWidget, "Left", 12)
invokeMenuItem("Edit", "Find/Replace", "Find/Replace")
diff --git a/tests/system/suite_HELP/tst_HELP06/test.py b/tests/system/suite_HELP/tst_HELP06/test.py
index d1d87f0b04..11ef0e7c0e 100755
--- a/tests/system/suite_HELP/tst_HELP06/test.py
+++ b/tests/system/suite_HELP/tst_HELP06/test.py
@@ -107,7 +107,7 @@ def main():
checkIfObjectExists(manualQModelIndex, verboseOnFail = True),
"Verifying if all folders and bookmarks are present")
mouseClick(waitForObject(":Qt Creator_Bookmarks_TreeView"), 5, 5, 0, Qt.LeftButton)
- for i in range(6):
+ for _ in range(6):
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Right>")
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Return>")
test.verify(textForQtVersion("Building and Running an Example") in getHelpTitle(),
diff --git a/tests/system/suite_QMLS/tst_QMLS02/test.py b/tests/system/suite_QMLS/tst_QMLS02/test.py
index 687f53a53f..752bf3a05e 100644
--- a/tests/system/suite_QMLS/tst_QMLS02/test.py
+++ b/tests/system/suite_QMLS/tst_QMLS02/test.py
@@ -48,7 +48,7 @@ def main():
"Verifying if error is properly reported")
# repair error - go to written line
placeCursorToLine(editorArea, testingCodeLine)
- for i in range(14):
+ for _ in range(14):
type(editorArea, "<Left>")
markText(editorArea, "Right")
type(editorArea, "c")
diff --git a/tests/system/suite_QMLS/tst_QMLS03/test.py b/tests/system/suite_QMLS/tst_QMLS03/test.py
index 0287c352f3..16120b81fe 100644
--- a/tests/system/suite_QMLS/tst_QMLS03/test.py
+++ b/tests/system/suite_QMLS/tst_QMLS03/test.py
@@ -90,7 +90,7 @@ def main():
if not placeCursorToLine(editorArea, "Rectangle {"):
invokeMenuItem("File", "Exit")
return
- for i in range(5):
+ for _ in range(5):
type(editorArea, "<Left>")
invokeContextMenuItem(editorArea, "Find Usages")
# check if usage was properly found
@@ -109,7 +109,7 @@ def main():
if not placeCursorToLine(editorArea, "anchors { left: parent.left; top: parent.top; right: parent.right; bottom: parent.verticalCenter }"):
invokeMenuItem("File", "Exit")
return
- for i in range(87):
+ for _ in range(87):
type(editorArea, "<Left>")
invokeMenuItem("Tools", "QML/JS", "Find Usages")
# check if usage was properly found
@@ -128,7 +128,7 @@ def main():
if not placeCursorToLine(editorArea, "SequentialAnimation on opacity {"):
invokeMenuItem("File", "Exit")
return
- for i in range(5):
+ for _ in range(5):
type(editorArea, "<Left>")
type(editorArea, "<Ctrl+Shift+u>")
# check if usage was properly found
diff --git a/tests/system/suite_QMLS/tst_QMLS04/test.py b/tests/system/suite_QMLS/tst_QMLS04/test.py
index 6d4d962477..b6336700c4 100644
--- a/tests/system/suite_QMLS/tst_QMLS04/test.py
+++ b/tests/system/suite_QMLS/tst_QMLS04/test.py
@@ -37,7 +37,7 @@ def main():
saveAndExit()
return
placeCursorToLine(editorArea, "TextEdit {")
- for i in range(5):
+ for _ in range(5):
type(editorArea, "<Left>")
# invoke Refactoring - Move Component into separate file
invokeContextMenuItem(editorArea, "Refactoring", "Move Component into Separate File")
diff --git a/tests/system/suite_QMLS/tst_QMLS05/test.py b/tests/system/suite_QMLS/tst_QMLS05/test.py
index 111bf68f39..9f78d8b8c4 100644
--- a/tests/system/suite_QMLS/tst_QMLS05/test.py
+++ b/tests/system/suite_QMLS/tst_QMLS05/test.py
@@ -32,13 +32,13 @@ def main():
homeKey = "<Home>"
if platform.system() == "Darwin":
homeKey = "<Ctrl+Left>"
- for i in range(2):
+ for _ in range(2):
type(editorArea, homeKey)
type(editorArea, "<Return>")
type(editorArea, "<Up>")
type(editorArea, "<Tab>")
type(editorArea, "Item { x: 10; y: 20; width: 10 }")
- for i in range(30):
+ for _ in range(30):
type(editorArea, "<Left>")
invokeMenuItem("File", "Save All")
# activate menu and apply 'Refactoring - Split initializer'
diff --git a/tests/system/suite_QMLS/tst_QMLS06/test.py b/tests/system/suite_QMLS/tst_QMLS06/test.py
index f4e9a12d92..9c61188e1f 100644
--- a/tests/system/suite_QMLS/tst_QMLS06/test.py
+++ b/tests/system/suite_QMLS/tst_QMLS06/test.py
@@ -32,14 +32,14 @@ def main():
homeKey = "<Home>"
if platform.system() == "Darwin":
homeKey = "<Ctrl+Left>"
- for i in range(2):
+ for _ in range(2):
type(editorArea, homeKey)
type(editorArea, "<Return>")
type(editorArea, "<Up>")
type(editorArea, "<Tab>")
testingItemText = "Item { x: 10; y: 20; width: 10 }"
type(editorArea, testingItemText)
- for i in range(30):
+ for _ in range(30):
type(editorArea, "<Left>")
invokeMenuItem("File", "Save All")
# invoke Refactoring - Wrap Component in Loader
diff --git a/tests/system/suite_QMLS/tst_QMLS07/test.py b/tests/system/suite_QMLS/tst_QMLS07/test.py
index 631aff0220..054332e521 100644
--- a/tests/system/suite_QMLS/tst_QMLS07/test.py
+++ b/tests/system/suite_QMLS/tst_QMLS07/test.py
@@ -31,7 +31,7 @@ def main():
return
type(editorArea, "<Return>")
type(editorArea, "Color")
- for i in range(3):
+ for _ in range(3):
type(editorArea, "<Left>")
invokeMenuItem("File", "Save All")
# invoke Refactoring - Add a message suppression comment.
diff --git a/tests/system/suite_QMLS/tst_QMLS08/test.py b/tests/system/suite_QMLS/tst_QMLS08/test.py
index bb5f9e4c14..5e0b3aefea 100644
--- a/tests/system/suite_QMLS/tst_QMLS08/test.py
+++ b/tests/system/suite_QMLS/tst_QMLS08/test.py
@@ -71,7 +71,7 @@ def main():
return
# cancel indentation
type(editorArea, "<Ctrl+a>")
- for i in range(5):
+ for _ in range(5):
type(editorArea, "<Shift+Backtab>")
# select unindented block
type(editorArea, "<Ctrl+a>")
diff --git a/tests/system/suite_debugger/tst_qml_js_console/test.py b/tests/system/suite_debugger/tst_qml_js_console/test.py
index 7022b09cd5..1d193541bc 100644
--- a/tests/system/suite_debugger/tst_qml_js_console/test.py
+++ b/tests/system/suite_debugger/tst_qml_js_console/test.py
@@ -68,7 +68,6 @@ def debuggerHasStopped():
def getQmlJSConsoleOutput():
try:
- result = []
consoleView = waitForObject(":DebugModeWidget_Debugger::Internal::ConsoleView")
model = consoleView.model()
# old input, output, new input > 2
@@ -135,7 +134,7 @@ def main():
switchViewTo(ViewConstants.EDIT)
# start debugging
clickButton(fancyDebugButton)
- locAndExprTV = waitForObject(":Locals and Expressions_Debugger::Internal::WatchTreeView")
+ waitForObject(":Locals and Expressions_Debugger::Internal::WatchTreeView")
rootIndex = getQModelIndexStr("text='Rectangle'",
":Locals and Expressions_Debugger::Internal::WatchTreeView")
# make sure the items inside the root item are visible
diff --git a/tests/system/suite_debugger/tst_qml_locals/test.py b/tests/system/suite_debugger/tst_qml_locals/test.py
index 06a60bb116..3429d5725f 100644
--- a/tests/system/suite_debugger/tst_qml_locals/test.py
+++ b/tests/system/suite_debugger/tst_qml_locals/test.py
@@ -117,7 +117,7 @@ def fetchItems(index, valIndex, treeView):
tree.setName(name)
tree.setValue(value)
for row in range(model.rowCount(index)):
- tree.addChild(fetchItems(model.index(row, 0, index), model.index(row, 1, index), treeView))
+ tree.addChild(fetchItems(model.index(row, 0, index), model.index(row, 1, index), treeView))
return tree
def checkForEmptyRows(items, isRootCheck=True):
diff --git a/tests/system/suite_editors/tst_qml_indent/test.py b/tests/system/suite_editors/tst_qml_indent/test.py
index f05da16317..2be24a94ce 100644
--- a/tests/system/suite_editors/tst_qml_indent/test.py
+++ b/tests/system/suite_editors/tst_qml_indent/test.py
@@ -44,7 +44,6 @@ def prepareQmlFile():
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
isDarwin = platform.system() == 'Darwin'
for i in range(3):
- content = "%s" % editor.plainText
if not placeCursorToLine(editor, 'title: qsTr("Hello World")'):
test.fatal("Couldn't find line(s) I'm looking for - QML file seems to "
"have changed!\nLeaving test...")
diff --git a/tests/system/suite_editors/tst_rename_macros/test.py b/tests/system/suite_editors/tst_rename_macros/test.py
index 581247bfdf..5a4177daad 100644
--- a/tests/system/suite_editors/tst_rename_macros/test.py
+++ b/tests/system/suite_editors/tst_rename_macros/test.py
@@ -118,7 +118,7 @@ def testRenameMacroAfterSourceMoving():
return True
def performMacroRenaming(newMacroName):
- for i in range(10):
+ for _ in range(10):
type(cppEditorStr, "<Left>")
invokeContextMenuItem(waitForObject(cppEditorStr), "Refactor",
"Rename Symbol Under Cursor")
diff --git a/tests/system/suite_general/tst_build_speedcrunch/test.py b/tests/system/suite_general/tst_build_speedcrunch/test.py
index ef51997c7f..1d7eda9088 100644
--- a/tests/system/suite_general/tst_build_speedcrunch/test.py
+++ b/tests/system/suite_general/tst_build_speedcrunch/test.py
@@ -24,7 +24,6 @@
############################################################################
source("../../shared/qtcreator.py")
-import re
SpeedCrunchPath = ""
diff --git a/tests/system/suite_general/tst_create_proj_wizard/test.py b/tests/system/suite_general/tst_create_proj_wizard/test.py
index adfe3d6044..34878b9566 100644
--- a/tests/system/suite_general/tst_create_proj_wizard/test.py
+++ b/tests/system/suite_general/tst_create_proj_wizard/test.py
@@ -45,7 +45,6 @@ def main():
projects = catModel.index(0, 0)
test.compare("Projects", str(projects.data()))
comboBox = findObject(":New.comboBox_QComboBox")
- targets = zip(*kits.values())[0]
test.verify(comboBox.enabled, "Verifying whether combobox is enabled.")
test.compare(comboBox.currentText, "All Templates")
try:
diff --git a/tests/system/suite_general/tst_default_settings/test.py b/tests/system/suite_general/tst_default_settings/test.py
index 72ff89c7e3..bb75bf9b32 100644
--- a/tests/system/suite_general/tst_default_settings/test.py
+++ b/tests/system/suite_general/tst_default_settings/test.py
@@ -26,8 +26,6 @@
source("../../shared/qtcreator.py")
import re
-import tempfile
-import __builtin__
currentSelectedTreeItem = None
warningOrError = re.compile('<p><b>((Error|Warning).*?)</p>')
diff --git a/tests/system/suite_qtquick/tst_qml_outline/test.py b/tests/system/suite_qtquick/tst_qml_outline/test.py
index e14c5eb539..7b806afc28 100644
--- a/tests/system/suite_qtquick/tst_qml_outline/test.py
+++ b/tests/system/suite_qtquick/tst_qml_outline/test.py
@@ -139,9 +139,9 @@ def verifyOutline(outlinePseudoTree, datasetFileName):
"Found %d elements, but expected %d" % (len(outlinePseudoTree), len(expected)))
return
for counter, (expectedItem, foundItem) in enumerate(zip(expected, outlinePseudoTree)):
- if expectedItem != foundItem:
- test.fail("Mismatch in element number %d for '%s'" % (counter + 1, fileName),
+ if expectedItem != foundItem:
+ test.fail("Mismatch in element number %d for '%s'" % (counter + 1, fileName),
"%s != %s" % (str(expectedItem), str(foundItem)))
- return
+ return
test.passes("All nodes (%d) inside outline match expected nodes for '%s'."
% (len(expected), fileName))
diff --git a/tests/system/suite_qtquick/tst_qtquick_creation/test.py b/tests/system/suite_qtquick/tst_qtquick_creation/test.py
index 584235282f..3eda2c6e0e 100644
--- a/tests/system/suite_qtquick/tst_qtquick_creation/test.py
+++ b/tests/system/suite_qtquick/tst_qtquick_creation/test.py
@@ -34,7 +34,6 @@ def main():
for qtVersion, controls in available:
targ = [Targets.DESKTOP_5_6_1_DEFAULT]
- quick = "2.6"
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
checkedTargets = createNewQtQuickApplication(workingDir, targets=targ,
diff --git a/tests/system/suite_tools/tst_git_local/test.py b/tests/system/suite_tools/tst_git_local/test.py
index 0206885fa2..4998c393e0 100644
--- a/tests/system/suite_tools/tst_git_local/test.py
+++ b/tests/system/suite_tools/tst_git_local/test.py
@@ -92,7 +92,7 @@ def __clickCommit__(count):
test.fail("Could not find the %d. commit - leaving test" % count)
return False
placeCursorToLine(gitEditor, line)
- for i in range(30):
+ for _ in range(30):
type(gitEditor, "<Left>")
# get the current cursor rectangle which should be positioned on the commit ID
rect = gitEditor.cursorRect()
@@ -234,7 +234,7 @@ def deleteProject():
if os.path.exists(path):
try:
# Make files in .git writable to remove them
- for root, dirs, files in os.walk(path):
+ for root, _, files in os.walk(path):
for name in files:
os.chmod(os.path.join(root, name), stat.S_IWUSR)
shutil.rmtree(path)