summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@theqtcompany.com>2015-11-04 11:52:47 +0100
committerRobin Burchell <robin.burchell@viroteck.net>2015-11-06 11:40:24 +0000
commitdf757a2e62456a919dfe2e983f003123c3eb151c (patch)
tree5dd7ea88faab172f420e5e3434c653b570009f24 /tests
parent9626baaea98edc13236250fc4b92d461b80e3875 (diff)
generate_expected_output: Open the file as binary.
Otherwise write() for my python (OS X 2.7) wants strings, which is incorrect. Change-Id: Ibd9d050646d1039ba8370d121dd25756ceffdb7a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/auto/testlib/selftests/generate_expected_output.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py
index 83c617fee5..1152f965ef 100755
--- a/tests/auto/testlib/selftests/generate_expected_output.py
+++ b/tests/auto/testlib/selftests/generate_expected_output.py
@@ -99,7 +99,7 @@ def generateTestData(testname):
cmd = [getTestForPath(testname) + ' -' + format + ' ' + extraArgs.get(testname, '')]
result = 'expected_' + testname + '.' + format
data = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True).communicate()[0]
- out = open(result, 'w')
+ out = open(result, 'wb')
out.write(data)
out.close()
replaceInFile(result)