Pycharm 中运行 Appium 脚本无法生成 HTMLTestRunner 报告!!但是在 CMD 中运行就可以!!希望大家帮忙
附简单的一个脚本:
import StringIO
import sys
import unittest
import HTMLTestRunner
class TestStringMethods(unittest.TestCase):
def test_dayin(self):
        print ("helloword!")
if name == "main":
    testsuite = unittest.TestSuite()
    testsuite.addTest(TestStringMethods("test_dayin"))
    file_name = "D:/result.html"
    fp = file(file_name, 'wb')
renner = HTMLTestRunner.HTMLTestRunner(stream=fp, title='test', description='testreport')
    renner.run(testsuite)