File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -98,12 +98,13 @@ def pytest_runtest_makereport(item, call):
98
98
outcome = yield
99
99
report = outcome .get_result ()
100
100
if report .when == "call" :
101
+ fixture_extras = getattr (item .config , "extras" , [])
101
102
plugin_extras = getattr (report , "extra" , [])
102
103
report .extra = fixture_extras + plugin_extras
103
104
104
105
105
106
@pytest .fixture
106
- def extra ():
107
+ def extra (pytestconfig ):
107
108
"""Add details to the HTML reports.
108
109
109
110
.. code-block:: python
@@ -112,8 +113,9 @@ def extra():
112
113
def test_foo(extra):
113
114
extra.append(pytest_html.extras.url('http://www.example.com/'))
114
115
"""
115
- del fixture_extras [:]
116
- return fixture_extras
116
+ pytestconfig .extras = []
117
+ yield pytestconfig .extras
118
+ del pytestconfig .extras [:]
117
119
118
120
119
121
def data_uri (content , mime_type = "text/plain" , charset = "utf-8" ):
You can’t perform that action at this time.
0 commit comments