mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-26 13:47:40 +00:00
Improve error messages
This commit is contained in:
+5
-1
@@ -291,7 +291,11 @@ class BaseTest(object):
|
|||||||
if is_aptly_command:
|
if is_aptly_command:
|
||||||
# remove the last two rows as go tests always print PASS/FAIL and coverage in those
|
# 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
|
# 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()
|
output = output.encode()
|
||||||
returncodes.append(int(returncode))
|
returncodes.append(int(returncode))
|
||||||
|
|||||||
Reference in New Issue
Block a user