def report(self, pdf, reportPath):
'''@brief generate this test's page in the PDF report.
@param pdf pyfpdf-compatible PDF object.
@param reportPath Path of directory containing the pdf report'''
pdf.add_page()
pdf.set_font('Courier', '', 12)
pdf.cell(0, 6, "Channel Communications Test", 0, 1, 'L', 1)
pdf.cell(0, 6, "", 0, 1, 'L', 0)
pdf.columnTable([self.channels, self.vals], colHeaders = ["Channel", "Value"], fontSize = 8)
if dump:
testPath = reportPath + "/" + self.title
os.mkdir(testPath)
with open(testPath + "/channels.dat", "wb") as output:
pickle.dump(self.channels, output)
with open(testPath + "/vals.dat", "wb") as output:
pickle.dump(self.vals, output)
评论列表
文章目录