Skip to content

Conversation

@dgusakov
Copy link
Contributor

@dgusakov dgusakov commented May 24, 2021

Pytest allows to redefine fixture using results of execution of original fixture (see https://docs.pytest.org/en/stable/fixture.html#overriding-fixtures-on-various-levels for details)
The previous implementation of fixture handling relied on str(fixturedef) which can be identical for both original and redefined fixtures so we use python built-in id()
fixturemanager.getfixturedefs(name, item.nodeid) returns fixturedefs for both original and redefined fixture so we need to use all results of fixturemanager.getfixturedefs and not just the last element.

Checklist

dgusakov added 2 commits May 24, 2021 09:38
Pytest allows to redefine fixture using results of execution of original fixture (see https://docs.pytest.org/en/stable/fixture.html#overriding-fixtures-on-various-levels for details)
The previous implementation of fixture handling relied on str(fixturedef) which can be identical for both original and redefined fixtures.
`fixturemanager.getfixturedefs(name, item.nodeid)` returns fixturedefs for both original and redefined fixture so we need to use all results of `fixturemanager.getfixturedefs` and not just the last element.
@sseliverstov sseliverstov merged commit a4e7f7f into allure-framework:master May 24, 2021
beckerGil pushed a commit to beckerGil/allure-python that referenced this pull request Apr 10, 2023
IvanBuruyane pushed a commit to IvanBuruyane/allure-python that referenced this pull request Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants