def save(self, filename): """ Save current state of report to files. """ testsuites = api.testsuites() for ts_name in self.ts_dict: ts = self.ts_dict[ts_name] testsuites.add_testsuite(ts) with open(filename, 'w') as fp: testsuites.export(fp, 0)
def __init__(self, name=None, skips=None): api.testsuite.__init__(self, name=name) self.skips = api._cast(int, skips)