Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix redefined fixtures handling - #592

#592
Merged
sseliverstov merged 2 commits into
allure-framework:masterallure-framework/allure-python:masterfrom
dgusakov:fix_redefined_fixtures_handlingdgusakov/allure-python:fix_redefined_fixtures_handlingCopy head branch name to clipboard
May 24, 2021
Merged

Fix redefined fixtures handling#592
sseliverstov merged 2 commits into
allure-framework:masterallure-framework/allure-python:masterfrom
dgusakov:fix_redefined_fixtures_handlingdgusakov/allure-python:fix_redefined_fixtures_handlingCopy head branch name to clipboard

Conversation

@dgusakov

@dgusakov dgusakov commented May 24, 2021

Copy link
Copy Markdown
Contributor

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.