aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@digia.com>2014-01-07 14:30:39 +0100
committerRobert Loehning <robert.loehning@digia.com>2014-01-07 15:24:57 +0100
commitf5ec3f4237c0279ab5f9fc7ae4e4d36f884e1447 (patch)
treeb6aac31cc58c62b711853c053d6f30ebcc6424d5 /tests
parent1362d9d262cb18f53a7d55717852ad63d501e480 (diff)
Squish: Make some variables local
Change-Id: I1687ae59c6327616ee18f6120dca9d0d0ce40bcf Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/system/shared/build_utils.py11
-rw-r--r--tests/system/suite_editors/tst_qml_editor/test.py2
-rw-r--r--tests/system/suite_editors/tst_revert_changes/test.py1
-rw-r--r--tests/system/suite_qtquick/tst_qml_outline/test.py2
4 files changed, 7 insertions, 9 deletions
diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py
index 5a2ff968cc7..c2755e710e5 100644
--- a/tests/system/shared/build_utils.py
+++ b/tests/system/shared/build_utils.py
@@ -35,10 +35,6 @@ installedSignalHandlers = {}
overridenInstallLazySignalHandlers = False
# flag to indicate whether a tasks file should be created when building ends with errors
createTasksFileOnError = True
-# currently used directory for tasks files
-tasksFileDir = None
-# counter for written tasks files
-tasksFileCount = 0
# call this function to override installLazySignalHandler()
def overrideInstallLazySignalHandler():
@@ -117,9 +113,14 @@ def dumpBuildIssues(listModel):
range(Qt.UserRole, Qt.UserRole + 6))])
return issueDump
+# counter for written tasks files
+tasksFileCount = 0
+
# helper method that writes a tasks file
def createTasksFile(buildIssues):
- global tasksFileDir, tasksFileCount
+ # currently used directory for tasks files
+ tasksFileDir = None
+ global tasksFileCount
if tasksFileDir == None:
tasksFileDir = os.getcwd() + "/tasks"
tasksFileDir = os.path.abspath(tasksFileDir)
diff --git a/tests/system/suite_editors/tst_qml_editor/test.py b/tests/system/suite_editors/tst_qml_editor/test.py
index 2e48fbb8b79..c030ec25561 100644
--- a/tests/system/suite_editors/tst_qml_editor/test.py
+++ b/tests/system/suite_editors/tst_qml_editor/test.py
@@ -29,11 +29,9 @@
source("../../shared/qtcreator.py")
-templateDir = None
searchFinished = False
def main():
- global templateDir
sourceExample = os.path.abspath(sdkPath + "/Examples/4.7/declarative/keyinteraction/focus")
proFile = "focus.pro"
if not neededFilePresent(os.path.join(sourceExample, proFile)):
diff --git a/tests/system/suite_editors/tst_revert_changes/test.py b/tests/system/suite_editors/tst_revert_changes/test.py
index b08ec394a53..f2be87c6bc5 100644
--- a/tests/system/suite_editors/tst_revert_changes/test.py
+++ b/tests/system/suite_editors/tst_revert_changes/test.py
@@ -43,7 +43,6 @@ def init():
endShortCut = "<Ctrl+End>"
def main():
- global cppEditorStr
folder = prepareTemplate(originalSources)
if folder == None:
test.fatal("Could not prepare test files - leaving test")
diff --git a/tests/system/suite_qtquick/tst_qml_outline/test.py b/tests/system/suite_qtquick/tst_qml_outline/test.py
index 2580fcf6de8..f09f03394b0 100644
--- a/tests/system/suite_qtquick/tst_qml_outline/test.py
+++ b/tests/system/suite_qtquick/tst_qml_outline/test.py
@@ -75,7 +75,7 @@ def processChildren(model, startIndex, level):
return children
def testModify():
- global qmlEditor, outline
+ global qmlEditor
if not openDocument("focus.QML.qml.focus\\.qml"):
test.fatal("Failed to open file focus.qml")
return