summaryrefslogtreecommitdiff
path: root/tests/test_html.py
diff options
context:
space:
mode:
authorXie Yanbo <xieyanbo@gmail.com>2020-07-24 07:10:50 +0800
committerNed Batchelder <ned@nedbatchelder.com>2020-07-23 19:13:19 -0400
commit224c73e34d80caebb34af1e06724fb7858ad732b (patch)
tree3746e43ed35104029814df4c4396319b1195cf14 /tests/test_html.py
parentdb4213b6ac6c85a916f0d58792057ad79456e043 (diff)
downloadpython-coveragepy-git-224c73e34d80caebb34af1e06724fb7858ad732b.tar.gz
Displaying timezone information in HTML report (#960)
* Displaying timezone information in HTML report * A helpber to format datetime with local timezone * No backward compatibility with older python versions
Diffstat (limited to 'tests/test_html.py')
-rw-r--r--tests/test_html.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_html.py b/tests/test_html.py
index b543fa08..6f22acc0 100644
--- a/tests/test_html.py
+++ b/tests/test_html.py
@@ -71,6 +71,11 @@ class HtmlTestHelpers(CoverageTest):
with open("htmlcov/index.html") as f:
index = f.read()
index = re.sub(
+ r"created at \d{4}-\d{2}-\d{2} \d{2}:\d{2} \+\d{4}",
+ r"created at YYYY-MM-DD HH:MM +ZZZZ",
+ index,
+ )
+ index = re.sub(
r"created at \d{4}-\d{2}-\d{2} \d{2}:\d{2}",
r"created at YYYY-MM-DD HH:MM",
index,
@@ -620,6 +625,7 @@ def compare_html(expected, actual):
scrubs = [
(r'/coverage.readthedocs.io/?[-.\w/]*', '/coverage.readthedocs.io/VER'),
(r'coverage.py v[\d.abc]+', 'coverage.py vVER'),
+ (r'created at \d\d\d\d-\d\d-\d\d \d\d:\d\d [-+]\d\d\d\d', 'created at DATE'),
(r'created at \d\d\d\d-\d\d-\d\d \d\d:\d\d', 'created at DATE'),
# Some words are identifiers in one version, keywords in another.
(r'<span class="(nam|key)">(print|True|False)</span>', r'<span class="nam">\2</span>'),