def save(self):
# save frames info, do not overwrite.
filepath = os.path.join(self.framedir, 'frames.json')
obj = {
'ctime' : time.ctime(),
'device' : self.device_info,
'frames' : self.frames,
}
with open(filepath, 'w') as f:
json.dump(obj, f, indent=2)
# save draft info
filepath = os.path.join(self.framedir, 'draft.json')
with open(filepath, 'w') as f:
json.dump(self.case_draft, f, indent=2)
# make a copy at casedir
filepath = os.path.join(self.casedir, 'case.json')
with open(filepath, 'w') as f:
json.dump(self.case_draft, f, indent=2)
# generate_script
self.generate_script()
评论列表
文章目录