Skip to content
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

Open
tryceboll opened this issue Sep 17, 2018 · 4 comments
Open

这里是不是有问题?? #1

tryceboll opened this issue Sep 17, 2018 · 4 comments

Comments

@tryceboll
Copy link

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)

@liwanlei
Copy link
Owner

liwanlei commented Sep 17, 2018 via email

@tryceboll
Copy link
Author

运行的时候,打开页面后,就闪退了!

@liwanlei
Copy link
Owner

liwanlei commented Sep 18, 2018 via email

@tryceboll
Copy link
Author

环境应该是没有问题的咯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants