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
Hi, it seems that the plugin fixtures' default scope is function, when I try to reference the fixture from a fixture with session scope, py.test will raise a ScopeMismatch error.
My use case is:
put a database schema init sql file to the data dir
add a fixture call init_db, which has session scope, and it will recreate the database schema only once during the whole test execution
init_db fixture use shared_datadir to read the init sql file
Any suggestions for this use case? Or can we change the plugin fixtures scope to session (or something else)?
The text was updated successfully, but these errors were encountered:
Hi, it seems that the plugin fixtures' default scope is
function
, when I try to reference the fixture from a fixture withsession
scope, py.test will raise aScopeMismatch
error.My use case is:
init_db
, which hassession
scope, and it will recreate the database schema only once during the whole test executioninit_db
fixture useshared_datadir
to read the init sql fileAny suggestions for this use case? Or can we change the plugin fixtures scope to
session
(or something else)?The text was updated successfully, but these errors were encountered: