mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Capture test results in prepared format. #81
This commit is contained in:
@@ -195,6 +195,8 @@ class BaseTest(object):
|
|||||||
self.verify_match(self.get_gold(), self.output, match_prepare=self.outputMatchPrepare)
|
self.verify_match(self.get_gold(), self.output, match_prepare=self.outputMatchPrepare)
|
||||||
except:
|
except:
|
||||||
if self.captureResults:
|
if self.captureResults:
|
||||||
|
if self.outputMatchPrepare is not None:
|
||||||
|
self.output = self.outputMatchPrepare(self.output)
|
||||||
with open(self.get_gold_filename(), "w") as f:
|
with open(self.get_gold_filename(), "w") as f:
|
||||||
f.write(self.output)
|
f.write(self.output)
|
||||||
else:
|
else:
|
||||||
@@ -206,6 +208,8 @@ class BaseTest(object):
|
|||||||
self.verify_match(self.get_gold(gold_name), output, match_prepare)
|
self.verify_match(self.get_gold(gold_name), output, match_prepare)
|
||||||
except:
|
except:
|
||||||
if self.captureResults:
|
if self.captureResults:
|
||||||
|
if match_prepare is not None:
|
||||||
|
output = match_prepare(output)
|
||||||
with open(self.get_gold_filename(gold_name), "w") as f:
|
with open(self.get_gold_filename(gold_name), "w") as f:
|
||||||
f.write(output)
|
f.write(output)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user