Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e771206

Browse files
committed
TST: Make test image visualization valid HTML5
1 parent 60a2123 commit e771206

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

tools/visualize_tests.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
# Non-png image extensions
1414
NON_PNG_EXTENSIONS = ['pdf', 'svg', 'eps']
1515

16-
html_template = """<html><head><style media="screen" type="text/css">
16+
html_template = """<!DOCTYPE html>
17+
<html lang="en"><head>
18+
<meta charset="utf-8">
19+
<title>Matplotlib test result visualization</title>
20+
<style media="screen">
1721
img{{
1822
width:100%;
1923
max-width:800px;
@@ -26,14 +30,18 @@
2630
"""
2731

2832
subdir_template = """<h2>{subdir}</h2><table>
29-
<thead><td>name</td><td>actual</td><td>expected</td><td>diff</td></thead>
33+
<thead><tr><th>name</th><th>actual</th><th>expected</th><th>diff</th></tr></thead>
34+
<tbody>
3035
{rows}
36+
</tbody>
3137
</table>
3238
"""
3339

3440
failed_template = """<h2>Only Failed</h2><table>
35-
<thead><td>name</td><td>actual</td><td>expected</td><td>diff</td></thead>
41+
<thead><tr><th>name</th><th>actual</th><th>expected</th><th>diff</th></tr></thead>
42+
<tbody>
3643
{rows}
44+
</tbody>
3745
</table>
3846
"""
3947

0 commit comments

Comments
 (0)