Skip to content

Commit 793a783

Browse files
dgusakovGilBecker-Anaplan
authored andcommitted
Fix missing fixtures in report when using lazy_fixture (via allure-framework#548)
1 parent 7dbed65 commit 793a783

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

allure-pytest/src/listener.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ def _test_fixtures(item):
279279
fixturemanager = item.session._fixturemanager
280280
fixturedefs = []
281281

282-
if hasattr(item, "fixturenames"):
283-
for name in item.fixturenames:
282+
if hasattr(item._request, "fixturenames"):
283+
for name in item._request.fixturenames:
284284
fixturedef = fixturemanager.getfixturedefs(name, item.nodeid)
285285
if fixturedef:
286286
fixturedefs.append(fixturedef[-1])

allure-pytest/tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ deps =
3737
pytest-flakes
3838
pytest-rerunfailures
3939
pytest-xdist
40+
pytest-lazy-fixture
4041
mock
4142
{distshare}/allure-python-commons-2*.zip
4243
{distshare}/allure-python-commons-test-2*.zip

0 commit comments

Comments
 (0)