run方法
Posted hai-peng
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了run方法相关的知识,希望对你有一定的参考价值。
def run_t(): try: log = InsertLog_P() dirpath = ‘./scripts‘ discover = unittest.defaultTestLoader.discover(dirpath,pattern=‘*_tc.py‘) suite = get_test_case(discover) ct = time.strftime(‘%y%m%d%H%M%S ‘) filedir = ‘./reports/‘ + ‘report‘ + ct + ‘.html‘ fp = open(filedir,‘w‘) runner = HTMLTestRunner(stream=fp,title=u‘test‘,description=u‘description‘ ) runner.run(suite) fp.close() log.info(u"脚本成功运行") except BaseException as msg: log.error(msg)
以上是关于run方法的主要内容,如果未能解决你的问题,请参考以下文章
add application window with unknown token XXX Unable to add window;is your activity is running?(代码片段
add application window with unknown token XXX Unable to add window;is your activity is running?(代码片段
svn报错cleanup failed–previous operation has not finished; run cleanup if it was interrupted的解决办法(代码片段
ubuntu16.04 yum报错:There are no enabled repos. Run “yum repolist all“ to see the repos you have.(代码片段