File tree 2 files changed +6
-0
lines changed
2 files changed +6
-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
5
6
6
7
def pytest_html_report_title (report ):
7
8
""" Called before adding the title to the report """
@@ -21,3 +22,6 @@ def pytest_html_results_table_row(report, cells):
21
22
22
23
def pytest_html_results_table_html (report , data ):
23
24
""" Called after building results table additional HTML. """
25
+
26
+ def pytest_html_report_final_dom (document : html .html ):
27
+ """ Called after the entire document has been created. Allows inspection and modification of DOM. """
Original file line number Diff line number Diff line change @@ -554,6 +554,8 @@ def generate_summary_item(self):
554
554
555
555
doc = html .html (head , body )
556
556
557
+ session .config .hook .pytest_html_report_complete (document = doc )
558
+
557
559
unicode_doc = "<!DOCTYPE html>\n {}" .format (doc .unicode (indent = 2 ))
558
560
559
561
# Fix encoding issues, e.g. with surrogates
You can’t perform that action at this time.
0 commit comments