Skip to content

Commit a8292bb

Browse files
Remove usage of funcargs
Fixes #282
1 parent b577d20 commit a8292bb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pytest_html/plugin.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
from . import __version__, __pypi_url__
3232

3333

34+
fixture_extras = []
35+
36+
3437
def pytest_addhooks(pluginmanager):
3538
from . import hooks
3639

@@ -95,7 +98,6 @@ def pytest_runtest_makereport(item, call):
9598
outcome = yield
9699
report = outcome.get_result()
97100
if report.when == "call":
98-
fixture_extras = item.funcargs.get("extra", [])
99101
plugin_extras = getattr(report, "extra", [])
100102
report.extra = fixture_extras + plugin_extras
101103

@@ -110,7 +112,8 @@ def extra():
110112
def test_foo(extra):
111113
extra.append(pytest_html.extras.url('http://www.example.com/'))
112114
"""
113-
return []
115+
del fixture_extras[:]
116+
return fixture_extras
114117

115118

116119
def data_uri(content, mime_type="text/plain", charset="utf-8"):

0 commit comments

Comments
 (0)