Skip to content
Permalink
Browse files

Fix python2 print

  • Loading branch information
m-kuhn committed May 5, 2020
1 parent baf18a4 commit 52ef2a46ca7f12ead35443274bad43f014b7a010
Showing with 6 additions and 6 deletions.
  1. +3 −3 .ci/travis/scripts/ctest2travis.py
  2. +1 −1 scripts/context_help_id.py
  3. +2 −2 tests/src/python/test_qgsserver.py
@@ -83,7 +83,7 @@ def start_test_fold():
end_fold() # tag=build
start_test_fold()

if re.search('\*\*\*Failed', updated_line) or re.search('\*\*\*Timeout', updated_line):
if re.search('***Failed', updated_line) or re.search('***Timeout', updated_line):
end_fold()
updated_line = colored(updated_line, 'red')
in_failing_test = True
@@ -97,14 +97,14 @@ def start_test_fold():
in_failure = False
else:
updated_line = colored(updated_line, 'yellow')
elif re.search('\*\*\* Segmentation fault', updated_line):
elif re.search('*** Segmentation fault', updated_line):
start_fold('segfault')
updated_line = colored(updated_line, 'magenta')
elif re.match(' Test failed: Segmentation fault', updated_line):
end_fold()

else:
if re.match('(FAIL|ERROR)[:\!].*', updated_line):
if re.match('(FAIL|ERROR)[:!].*', updated_line):
updated_line = colored(updated_line, 'yellow')
in_failure = True

@@ -45,4 +45,4 @@
print(context_id)
else:
# if no class name was specified, give a bit of help
print "To generate a context sensitive help id, specify the QGIS class name on the command line"
print("To generate a context sensitive help id, specify the QGIS class name on the command line")
@@ -216,7 +216,7 @@ def _img_diff_error(self, response, headers, image, max_diff=100, max_size_diff=
with open(os.path.join(tempfile.gettempdir(), image + "_result." + extFile), "rb") as rendered_file:
encoded_rendered_file = base64.b64encode(rendered_file.read())
if not os.environ.get('ENCODED_OUTPUT'):
message = "Image is wrong\: rendered file %s/%s_result.%s" % (tempfile.gettempdir(), image, extFile)
message = "Image is wrong: rendered file %s/%s_result.%s" % (tempfile.gettempdir(), image, extFile)
else:
message = "Image is wrong\n%s\nImage:\necho '%s' | base64 -d >%s/%s_result.%s" % (
report, encoded_rendered_file.strip().decode('utf8'), tempfile.gettempdir(), image, extFile
@@ -226,7 +226,7 @@ def _img_diff_error(self, response, headers, image, max_diff=100, max_size_diff=
if os.path.exists(os.path.join(tempfile.gettempdir(), image + "_result_diff." + extFile)):
with open(os.path.join(tempfile.gettempdir(), image + "_result_diff." + extFile), "rb") as diff_file:
if not os.environ.get('ENCODED_OUTPUT'):
message = "Image is wrong\: diff file %s/%s_result_diff.%s" % (tempfile.gettempdir(), image, extFile)
message = "Image is wrong: diff file %s/%s_result_diff.%s" % (tempfile.gettempdir(), image, extFile)
else:
encoded_diff_file = base64.b64encode(diff_file.read())
message += "\nDiff:\necho '%s' | base64 -d > %s/%s_result_diff.%s" % (

0 comments on commit 52ef2a4

Please sign in to comment.
You can’t perform that action at this time.