Skip to content

Commit cf0946b

Browse files
committed
fix: Add config to report object
1 parent 0408b0d commit cf0946b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/pytest_html/nextgen.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ def insert(self, index, html):
4545
self._html[index] = html
4646

4747
class Report:
48-
def __init__(self, title, duration_format):
48+
def __init__(self, title, duration_format, config):
49+
self._config = config
4950
self._data = {
5051
"title": title,
5152
"collectedItems": 0,
@@ -57,6 +58,10 @@ def __init__(self, title, duration_format):
5758
"additionalSummary": defaultdict(list),
5859
}
5960

61+
@property
62+
def config(self):
63+
return self._config
64+
6065
@property
6166
def data(self):
6267
return self._data
@@ -85,7 +90,9 @@ def __init__(self, report_path, config, default_css="style.css"):
8590
self._max_asset_filename_length = int(
8691
config.getini("max_asset_filename_length")
8792
)
88-
self._report = self.Report(self._report_path.name, self._duration_format)
93+
self._report = self.Report(
94+
self._report_path.name, self._duration_format, config
95+
)
8996

9097
@property
9198
def css(self):

0 commit comments

Comments
 (0)