html-testRunner 不生成任何报告

时间:2021-04-01 13:07:51

标签: python

所以我通过这个 command 安装模块:

pip check html-testRunner

当我使用 pip check html-testRunner 命令检查错误时:

No broken requirements found

我的测试类:

import HtmlTestRunner

class Tests(BaseTests):
    def setUp(self):
        super().setUp()

    def test_print_entries(self):
        # All the steps...


if __name__ == '__main__':
    unittest.main(testRunner=HtmlTestRunner.HTMLTestRunner(output='C:/Users/dan/Downloads/nms/reports'))

基础测试

class BaseTests(unittest.TestCase):
    def setUp(self):
        # Some stuff

    def tearDown(self):
        # Some stuff

目录C:/Users/dan/Downloads/nms/reports存在

并使用此 command 运行测试:

python -m unittest C:\Users\dan\Downloads\nms\src\tests\tests.py

测试通过,但我无法在最后看到消息 Generating HTML reports... 我的报告目录是空的。

我正在使用 html-testRunner==1.2.1python 3.8.1

0 个答案:

没有答案