@@ -227,7 +227,7 @@ def hash_status_msg(status):
227
227
return messages [status ]
228
228
229
229
230
- def generate_summary_html (results , results_dir ):
230
+ def generate_summary_html (results , results_dir , hash_library = None ):
231
231
"""Generate the HTML summary.
232
232
233
233
Parameters
@@ -236,6 +236,9 @@ def generate_summary_html(results, results_dir):
236
236
The `pytest_mpl.plugin.ImageComparison._test_results` object.
237
237
results_dir : Path
238
238
Path to the output directory.
239
+ hash_library : str, optional, default=None
240
+ Filename of the generated hash library at the root of `results_dir`.
241
+ Will be linked to in HTML if not None.
239
242
"""
240
243
241
244
# Initialize Jinja
@@ -251,7 +254,7 @@ def generate_summary_html(results, results_dir):
251
254
252
255
# Render HTML starting from the base template
253
256
template = env .get_template ("base.html" )
254
- html = template .render (results = Results (results ))
257
+ html = template .render (results = Results (results ), hash_library = hash_library )
255
258
256
259
# Write files
257
260
for file in ['styles.css' , 'extra.js' , 'hash.svg' , 'image.svg' ]:
@@ -264,7 +267,7 @@ def generate_summary_html(results, results_dir):
264
267
return html_file
265
268
266
269
267
- def generate_summary_basic_html (results , results_dir ):
270
+ def generate_summary_basic_html (results , results_dir , hash_library = None ):
268
271
"""Generate the basic HTML summary.
269
272
270
273
Parameters
@@ -273,6 +276,9 @@ def generate_summary_basic_html(results, results_dir):
273
276
The `pytest_mpl.plugin.ImageComparison._test_results` object.
274
277
results_dir : Path
275
278
Path to the output directory.
279
+ hash_library : str, optional, default=None
280
+ Filename of the generated hash library at the root of `results_dir`.
281
+ Will be linked to in HTML if not None.
276
282
"""
277
283
278
284
# Initialize Jinja
@@ -283,7 +289,7 @@ def generate_summary_basic_html(results, results_dir):
283
289
284
290
# Render HTML starting from the base template
285
291
template = env .get_template ("basic.html" )
286
- html = template .render (results = Results (results ))
292
+ html = template .render (results = Results (results ), hash_library = hash_library )
287
293
288
294
# Write files
289
295
html_file = results_dir / 'fig_comparison_basic.html'
0 commit comments