求解,看了快一天。

#!/usr/bin/env python
# -*- coding:utf-8 -*- 

import unittest
from miaoa_config.HTMLTestRunner_PY3 import HTMLTestRunner
from miaoa_unit import userlogin



suit = unittest.TestSuite()
#suit.addTest(unittest.TestLoader().loadTestsFromTestCase(userlogin.Login))
suit.addTest(unittest.makeSuite(userlogin.Login))

report_title = '接口自动化测试'
desc = '自动化接口测试报告'
report_file = 'miaoa_report.html'

open(report_file, 'wb')

runner = HTMLTestRunner.HTMLTestRunner(stream = report_file,title = report_title,description = desc)

runner.run(suit)

runner.run(suit)  报错     错误信息:AttributeError: 'NoneType' object has no attribute 'run'

 

 

你可能感兴趣的:(求解,看了快一天。)