def testBasic(): sp = u.load() report = locationreport.LocationReport(scenereport.SceneReport(sp)) data = report.generate() # try to catch cases where generate returns something other than a PDF # document assert len(data) > 200 assert data[:8] == "%PDF-1.5"
def genLocationReport(mainFrame, sp): report = locationreport.LocationReport(scenereport.SceneReport(sp)) dlg = misc.CheckBoxDlg(mainFrame, "Report type", report.inf, "Information to include:", False) ok = False if dlg.ShowModal() == wx.ID_OK: ok = True dlg.Destroy() if not ok: return data = report.generate() gutil.showTempPDF(data, sp.cfgGl, mainFrame)