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
py.test has a concept of scopes for fixtures which is being used to store data that is global and only needs to be loaded once per test module or once per testing session.
Similarly, we can use directives to store connections to databases and other global resources.
Since we don't want to create a new connection every time the directive is called we need some way to memoize the value of the directive for further use.
Can this be done with the current API? If not, what do we need to do in order to add this functionality?
The text was updated successfully, but these errors were encountered:
Just to clarify, I'm assuming you are refering to http://pytest.org .
Note that your question to me seem to suggest how a technical solution for #376 could be implemented.
(In my simple hug solutions I'm using global variables, which has some drawbacks. I'll add a comment to #376 about this next.)
py.test has a concept of scopes for fixtures which is being used to store data that is global and only needs to be loaded once per test module or once per testing session.
Similarly, we can use directives to store connections to databases and other global resources.
Since we don't want to create a new connection every time the directive is called we need some way to memoize the value of the directive for further use.
Can this be done with the current API? If not, what do we need to do in order to add this functionality?
The text was updated successfully, but these errors were encountered: