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

Add line of code required to run examples for Other Testing Tricks section #1380

Merged
merged 1 commit into from Apr 1, 2015

Conversation

KWinston
Copy link
Contributor

As it stated, documentation states full example that demonstrates this approach, with the way it is implemented. It requires this line of code to perform the test functions on the three examples under Other Testing Tricks.

@keyan
Copy link
Contributor

keyan commented Mar 13, 2015

Hi @KWinston, in the future it would be helpful make your PR title more specific and clear. The commit message you have is much less ambiguous and would be a good PR title as well.

To address the suggested change, it is meant to be implied that the code provided in that subsection is part of the same module defined above in the "The Testing Skeleton" subsection. Therefore an import statement is not necessary. Notice how the sample code in the "Logging In and Out" and "The First Test" sections similarly does not include import statements.

@KWinston
Copy link
Contributor Author

Okay, I will keep note of that. In this case, import flask is not in "The Testing Skeleton" either meaning this section of code will not be able to run without import flask.
Should it be in "The Testing Skeleton"?

Other lines such as in Faking Resources and Context has
from flask import appcontext_pushed
which allow it to use appcontext_pushed.function()
instead of flask.appcontext_pushed.function()

There is a differences of expressions in the snippets.

@untitaker
Copy link
Contributor

I think this is fine as-is. The testing skeleton covers a specific example, the code blocks there are completely distinct.

@untitaker
Copy link
Contributor

Thanks!

untitaker added a commit that referenced this pull request Apr 1, 2015
Add line of code required to run examples for Other Testing Tricks section
@untitaker untitaker merged commit b57a076 into pallets:master Apr 1, 2015
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants