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 https://github.com/pytest-dev/pytest/issues/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.
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 https://github.com/pytest-dev/pytest/issues/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.