You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
session-scoped fixtures are not guaranteed to be unique by session, and module-scoped fixtures are not guaranteed to be unique for an unique parameter, in pytest. See pytest-dev/pytest#2846
We could at least try to provide a workaround in the @cases_fixture decorator, such as ensure_unique=True.
Note that pytest-dev/pytest#3393 will not solve the problem because if users have two parametrized session-scoped fixtures, one of them will end-up being setup/teardown twice for each of its parameters.
The text was updated successfully, but these errors were encountered:
smarie
changed the title
Provide a uniqueness @cases_fixture
Provide a parameter to guarantee fixture uniqueness in @cases_fixtureDec 21, 2018
smarie
changed the title
Provide a parameter to guarantee fixture uniqueness in @cases_fixture
Provide a parameter to guarantee fixture uniqueness in @pytest_fixture_plusJan 7, 2019
Updated this issue since @cases_fixture is now deprecated and equivalent to @fixture + @parametrize_with_cases
smarie
changed the title
Provide a parameter to guarantee fixture uniqueness in @pytest_fixture_plus
Provide a parameter to guarantee fixture uniqueness in @fixtureJul 9, 2020
session-scoped fixtures are not guaranteed to be unique by session, and module-scoped fixtures are not guaranteed to be unique for an unique parameter, in pytest. See pytest-dev/pytest#2846
We could at least try to provide a workaround in the
@cases_fixture
decorator, such asensure_unique=True
.Note that pytest-dev/pytest#3393 will not solve the problem because if users have two parametrized session-scoped fixtures, one of them will end-up being setup/teardown twice for each of its parameters.
The text was updated successfully, but these errors were encountered: