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

单独运行HTMLTestRunner,报错 #3

Open
sky1984 opened this issue Aug 12, 2019 · 1 comment
Open

单独运行HTMLTestRunner,报错 #3

sky1984 opened this issue Aug 12, 2019 · 1 comment

Comments

@sky1984
Copy link

sky1984 commented Aug 12, 2019

self.passrate = str("%.2f%%" % (float(result.success_count) / float(result.success_count + result.failure_count + result.error_count) * 100))

@sky1984
Copy link
Author

sky1984 commented Aug 12, 2019

"D:\Program Files\Python37\python.exe" "D:/Program Files/Python37/Projects/DemoUI-master/package/HTMLTestRunner.py"
Traceback (most recent call last):
File "D:/Program Files/Python37/Projects/DemoUI-master/package/HTMLTestRunner.py", line 961, in
main(module=None)
File "D:\Program Files\Python37\lib\unittest\main.py", line 101, in init
self.runTests()
File "D:/Program Files/Python37/Projects/DemoUI-master/package/HTMLTestRunner.py", line 952, in runTests
unittest.TestProgram.runTests(self)
File "D:\Program Files\Python37\lib\unittest\main.py", line 271, in runTests
self.result = testRunner.run(self.test)
File "D:/Program Files/Python37/Projects/DemoUI-master/package/HTMLTestRunner.py", line 746, in run
self.generateReport(test, result)
File "D:/Program Files/Python37/Projects/DemoUI-master/package/HTMLTestRunner.py", line 796, in generateReport
report_attrs = self.getReportAttributes(result)
File "D:/Program Files/Python37/Projects/DemoUI-master/package/HTMLTestRunner.py", line 784, in getReportAttributes
self.passrate = str("%.2f%%" % (float(result.success_count) / float(result.success_count + result.failure_count + result.error_count) * 100))
ZeroDivisionError: float division by zero

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

1 participant