-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
这里是不是有问题?? #1
Comments
你运行报错了吗
| |
李雷雷
|
|
邮箱:[email protected]
|
签名由 网易邮箱大师 定制
在2018年09月17日 18:09,tryceboll 写道:
import unittest,time,os
from util import BSTestRunner
from config import description,reporttitle
path=os.getcwd() # 你这里是获取当前脚本路径
case_path=path+'\case' # 你这里path路径下面没有case这个脚本啊,这个是不是有点问题???
def create_report():
test_suit = unittest.TestSuite()
discover = unittest.defaultTestLoader.discover(case_path, pattern='*test.py', top_level_dir=None)
for test in discover:
for test_case in test:
test_suit.addTest(test_case)
now=time.strftime('%Y-%m-%d_%H_%M',time.localtime(time.time()))
report_dir=path+'\report\%s.html'%now
re_open= open(report_dir,'wb')
runner=BSTestRunner.BSTestRunner(stream=re_open,title=reporttitle,description=description)
runner.run(test_suit)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
运行的时候,打开页面后,就闪退了! |
你环境配置好没有
| |
李雷雷
|
|
邮箱:[email protected]
|
签名由 网易邮箱大师 定制
在2018年09月18日 09:01,tryceboll 写道:
运行的时候,打开页面后,就闪退了!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
环境应该是没有问题的咯 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
import unittest,time,os
from util import BSTestRunner
from config import description,reporttitle
path=os.getcwd() # 你这里是获取当前脚本路径
case_path=path+'\case' # 你这里path路径下面没有case这个脚本啊,这个是不是有点问题???
def create_report():
test_suit = unittest.TestSuite()
discover = unittest.defaultTestLoader.discover(case_path, pattern='*test.py', top_level_dir=None)
for test in discover:
for test_case in test:
test_suit.addTest(test_case)
now=time.strftime('%Y-%m-%d_%H_%M',time.localtime(time.time()))
report_dir=path+'\report\%s.html'%now
re_open= open(report_dir,'wb')
runner=BSTestRunner.BSTestRunner(stream=re_open,title=reporttitle,description=description)
runner.run(test_suit)
The text was updated successfully, but these errors were encountered: