Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access context values from following context #96

Open
dag opened this issue Apr 18, 2011 · 1 comment
Open

Access context values from following context #96

dag opened this issue Apr 18, 2011 · 1 comment
Labels
Milestone

Comments

@dag
Copy link
Owner

dag commented Apr 18, 2011

Ideally I think of contexts as independent of each other, which allows for flexible reuse, but practically it seems useful to be able to get existing test arguments in further contexts. For example Flask-Attest creates a context that returns the app; in other contexts one might need the app. There's current_app but it relies on context-locals and might not apply in other situations.

So, let the argspecs of context functions work like that of tests:

@frontend.context
def configure(app):
    app.config['FOO'] = 'BAR'
    yield
    del app.config['FOO']
@dag
Copy link
Owner Author

dag commented Apr 18, 2011

Possibly related to #93, I recall there may even have been issues with current_app; research needed for if the request context is set up correctly before other contexts, or if this is a nested() issue with Attest.

@ghost ghost assigned dag Apr 18, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant