File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 2
2
# License, v. 2.0. If a copy of the MPL was not distributed with this
3
3
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
4
5
+ from py .xml import html
6
+
5
7
6
8
def pytest_html_report_title (report ):
7
9
""" Called before adding the title to the report """
@@ -21,3 +23,7 @@ def pytest_html_results_table_row(report, cells):
21
23
22
24
def pytest_html_results_table_html (report , data ):
23
25
""" Called after building results table additional HTML. """
26
+
27
+
28
+ def pytest_html_report_final_dom (document : html .html ):
29
+ """ Called after the entire document has been created. """
Original file line number Diff line number Diff line change @@ -558,6 +558,8 @@ def generate_summary_item(self):
558
558
559
559
doc = html .html (head , body )
560
560
561
+ session .config .hook .pytest_html_report_final_dom (document = doc )
562
+
561
563
unicode_doc = "<!DOCTYPE html>\n {}" .format (doc .unicode (indent = 2 ))
562
564
563
565
# Fix encoding issues, e.g. with surrogates
You can’t perform that action at this time.
0 commit comments