teardown

def teardown(self):
"""
我是teardown
:return:
"""
if sys.exc_info()[0]:
with nose.allure.step(u'失败行为'):
self.logger.info("Exception message" )

self.logger.info("teardown")
with nose.allure.step(u'上传用例测试log'):
nose.allure.attach("text log ", open(self.txt_path, "rb").read(),
AttachmentType.TEXT)
self.logger.info("pull log")
time.sleep(5)

posted @ 2020-07-31 18:12  峡谷恶霸  阅读(296)  评论(0编辑  收藏  举报