Skip to content

Commit 21cf389

Browse files
authored
fix: Add config to report object (#588)
1 parent d02dac0 commit 21cf389

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/pytest_html/nextgen.py

Lines changed: 8 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):
48+
def __init__(self, title, config):
49+
self._config = config
4950
self._data = {
5051
"title": title,
5152
"collectedItems": 0,
@@ -56,6 +57,10 @@ def __init__(self, title):
5657
"additionalSummary": defaultdict(list),
5758
}
5859

60+
@property
61+
def config(self):
62+
return self._config
63+
5964
@property
6065
def data(self):
6166
return self._data
@@ -86,7 +91,8 @@ def __init__(self, report_path, config, default_css="style.css"):
8691
self._max_asset_filename_length = int(
8792
config.getini("max_asset_filename_length")
8893
)
89-
self._report = self.Report(self._report_path.name)
94+
95+
self._report = self.Report(self._report_path.name, config)
9096

9197
@property
9298
def css(self):

0 commit comments

Comments
 (0)