Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Denis Rouzaud <denis.rouzaud@gmail.com>
  • Loading branch information
m-kuhn and 3nids committed May 6, 2020
1 parent 841328e commit 3e6c7c2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .ci/travis/scripts/ctest2travis.py
Expand Up @@ -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(r'\*\*\*Failed', updated_line) or re.search(r'\*\*\*Timeout', updated_line):
end_fold()
updated_line = colored(updated_line, 'red')
in_failing_test = True
Expand All @@ -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(r'\*\*\* 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(r'(FAIL|ERROR)[:\!].*', updated_line):
updated_line = colored(updated_line, 'yellow')
in_failure = True

Expand Down
2 changes: 1 addition & 1 deletion scripts/qgis_fixes/fix_signals.py
Expand Up @@ -59,7 +59,7 @@ class FixSignals(fixer_base.BaseFix):

def transform(self, node, results):
signal = results.get("signal").value
signal = re.sub('^["\']([^(]+)(?:(.*))?["\']$', '\\1', signal)
signal = re.sub('^["\']([^(]+)(?:\\(.*\\))?["\']$', '\\1', signal)

if 'emitter' in results:
emitter = results.get("emitter").clone()
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgsserver.py
Expand Up @@ -51,7 +51,7 @@


# Strip path and content length because path may vary
RE_STRIP_UNCHECKABLE = rb'MAP=[^"]+|Content-Length: \d+'
RE_STRIP_UNCHECKABLE = br'MAP=[^"]+|Content-Length: \d+'
RE_ELEMENT = br'</*([^>\[\s]+)[ >]'
RE_ELEMENT_CONTENT = br'<[^>\[]+>(.+)</[^>\[\s]+>'
RE_ATTRIBUTES = rb'((?:(?!\s|=).)*)\s*?=\s*?["\']?((?:(?<=")(?:(?<=\\)"|[^"])*|(?<=\')(?:(?<=\\)\'|[^\'])*)|(?:(?!"|\')(?:(?!\/>|>|\s).)+))'
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgsserver_wfst.py
Expand Up @@ -92,7 +92,7 @@ def setUpClass(cls):
cls.server = subprocess.Popen([sys.executable, server_path],
env=os.environ, stdout=subprocess.PIPE)
line = cls.server.stdout.readline()
cls.port = int(re.findall(r':(\d+)', line)[0])
cls.port = int(re.findall(br':(\d+)', line)[0])
assert cls.port != 0
# Wait for the server process to start
assert waitServer('http://127.0.0.1:%s' % cls.port), "Server is not responding!"
Expand Down

0 comments on commit 3e6c7c2

Please sign in to comment.