mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-04-19 19:28:22 +00:00
Improve error messages
This commit is contained in:
@@ -291,7 +291,11 @@ class BaseTest(object):
|
||||
if is_aptly_command:
|
||||
# remove the last two rows as go tests always print PASS/FAIL and coverage in those
|
||||
# two lines. This would otherwise fail the tests as they would not match gold
|
||||
output, _, returncode = re.findall(r"((.|\n)*)EXIT: (\d)\n.*\ncoverage: .*", raw_output.decode("utf-8"))[0]
|
||||
matches = re.findall(r"((.|\n)*)EXIT: (\d)\n.*\ncoverage: .*", raw_output.decode("utf-8"))
|
||||
if not matches:
|
||||
raise Exception("no matches found in output '%s'" % raw_output.decode("utf-8"))
|
||||
|
||||
output, _, returncode = matches[0]
|
||||
|
||||
output = output.encode()
|
||||
returncodes.append(int(returncode))
|
||||
|
||||
Reference in New Issue
Block a user