diff options
author | Xie Yanbo <xieyanbo@gmail.com> | 2020-07-24 07:10:50 +0800 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2020-07-23 19:13:19 -0400 |
commit | 224c73e34d80caebb34af1e06724fb7858ad732b (patch) | |
tree | 3746e43ed35104029814df4c4396319b1195cf14 /tests/test_html.py | |
parent | db4213b6ac6c85a916f0d58792057ad79456e043 (diff) | |
download | python-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.py | 6 |
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>'), |