aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/system/shared/utils.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py
index e89e969a7e0..590b277a1e6 100644
--- a/tests/system/shared/utils.py
+++ b/tests/system/shared/utils.py
@@ -605,10 +605,8 @@ def progressBarWait(timeout=60000, warn=True):
checkIfObjectExists(":Qt Creator_Core::Internal::ProgressBar", False, timeout)
def readFile(filename):
- f = open(filename, "r")
- content = f.read()
- f.close()
- return content
+ with open(filename, "r") as f:
+ return f.read()
def simpleFileName(navigatorFileName):
# try to find the last part of the given name, assume it's inside a (folder) structure