@@ -227,7 +227,7 @@ def hash_status_msg(status):
227227 return messages [status ]
228228
229229
230- def generate_summary_html (results , results_dir ):
230+ def generate_summary_html (results , results_dir , hash_library = None ):
231231 """Generate the HTML summary.
232232
233233 Parameters
@@ -236,6 +236,9 @@ def generate_summary_html(results, results_dir):
236236 The `pytest_mpl.plugin.ImageComparison._test_results` object.
237237 results_dir : Path
238238 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.
239242 """
240243
241244 # Initialize Jinja
@@ -251,7 +254,7 @@ def generate_summary_html(results, results_dir):
251254
252255 # Render HTML starting from the base template
253256 template = env .get_template ("base.html" )
254- html = template .render (results = Results (results ))
257+ html = template .render (results = Results (results ), hash_library = hash_library )
255258
256259 # Write files
257260 for file in ['styles.css' , 'extra.js' , 'hash.svg' , 'image.svg' ]:
@@ -264,7 +267,7 @@ def generate_summary_html(results, results_dir):
264267 return html_file
265268
266269
267- def generate_summary_basic_html (results , results_dir ):
270+ def generate_summary_basic_html (results , results_dir , hash_library = None ):
268271 """Generate the basic HTML summary.
269272
270273 Parameters
@@ -273,6 +276,9 @@ def generate_summary_basic_html(results, results_dir):
273276 The `pytest_mpl.plugin.ImageComparison._test_results` object.
274277 results_dir : Path
275278 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.
276282 """
277283
278284 # Initialize Jinja
@@ -283,7 +289,7 @@ def generate_summary_basic_html(results, results_dir):
283289
284290 # Render HTML starting from the base template
285291 template = env .get_template ("basic.html" )
286- html = template .render (results = Results (results ))
292+ html = template .render (results = Results (results ), hash_library = hash_library )
287293
288294 # Write files
289295 html_file = results_dir / 'fig_comparison_basic.html'
0 commit comments