diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/python2x/HTMLTestRunnerCN.py b/HTMLTestRunnerCN.py
similarity index 83%
rename from python2x/HTMLTestRunnerCN.py
rename to HTMLTestRunnerCN.py
index 7f6175c..45cf59c 100644
--- a/python2x/HTMLTestRunnerCN.py
+++ b/HTMLTestRunnerCN.py
@@ -6,23 +6,23 @@
The simplest way to use this is to invoke its main method. E.g.
import unittest
- import HTMLTestRunner
+ import HTMLTestReportCN
... define your tests ...
if __name__ == '__main__':
- HTMLTestRunner.main()
+ HTMLTestReportCN.main()
-For more customization options, instantiates a HTMLTestRunner object.
-HTMLTestRunner is a counterpart to unittest's TextTestRunner. E.g.
+For more customization options, instantiates a HTMLTestReportCN object.
+HTMLTestReportCN is a counterpart to unittest's TextTestRunner. E.g.
# output to a file
fp = file('my_report.html', 'wb')
- runner = HTMLTestRunner.HTMLTestRunner(
+ runner = HTMLTestReportCN.HTMLTestReportCN(
stream=fp,
title='My unit test',
- description='This demonstrates the report output by HTMLTestRunner.'
+ description='This demonstrates the report output by HTMLTestReportCN.'
)
# Use an external stylesheet.
@@ -35,6 +35,7 @@
------------------------------------------------------------------------
Copyright (c) 2004-2007, Wai Yip Tung
+Copyright (c) 2017, Findyou
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -66,11 +67,20 @@
# URL: http://tungwaiyip.info/software/HTMLTestRunner.html
__author__ = "Wai Yip Tung, Findyou"
-__version__ = "0.8.2.1"
+__version__ = "0.8.3"
"""
Change History
+Version 0.8.3 -Findyou 20171206
+* BUG fixed :错误的测试用例没有统计与显示
+* BUG fixed :当PASS的测试用例有print内容时,通过按钮显示为红色
+* 表格背景颜色根据用例结果显示颜色,优先级: 错误(黄色)>失败(红色)>通过(绿色)
+* 合并文为HTMLTestRunner*N.py 同时支持python2,python3
+
+Version 0.8.2.2 -Findyou
+* HTMLTestRunnerEN.py 支持 python3.x
+* HTMLTestRunnerEN.py 支持 python2.x
Version 0.8.2.1 -Findyou
* 支持中文,汉化
@@ -99,14 +109,20 @@
# TODO: simplify javascript using ,ore than 1 class in the class attribute?
import datetime
-import StringIO
+try:
+ from StringIO import StringIO
+except ImportError:
+ from io import StringIO
import sys
import time
import unittest
from xml.sax import saxutils
-import sys
-reload(sys)
-sys.setdefaultencoding('utf-8')
+
+try:
+ reload(sys)
+ sys.setdefaultencoding('utf-8')
+except NameError:
+ pass
# ------------------------------------------------------------------------
# The redirectors below are used to capture output during testing. Output
@@ -185,9 +201,9 @@ class Template_mixin(object):
2: '错误',
}
- DEFAULT_TITLE = '单元测试报告'
+ DEFAULT_TITLE = '测试报告'
DEFAULT_DESCRIPTION = ''
- DEFAULT_TESTER='最棒QA'
+ DEFAULT_TESTER='QA'
# ------------------------------------------------------------------------
# HTML Template
@@ -205,22 +221,34 @@ class Template_mixin(object):
%(stylesheet)s
+%(heading)s
+%(report)s
+%(ending)s
-%(heading)s
-%(report)s
-%(ending)s
-