fix: move calls requiring integ test environment setup from test setup to inside test body #256
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
related to: pyca/cryptography#5197
Description of changes:
In a recent batch of test refactoring, I inadvertently moved some calls that relied on integ test environment setup (namely: setting certain environment variables) into the test setup that used to be within the test body. This caused these calls to be made during pytest test discovery. This is a problem because we use pytest markers to categorize our tests and test discovery must complete before markers can be applied to filter tests to run.
We have a test (
TOXENV=nocmk
) that should have caught this, but it looks like it was no longer removing the environment variable restrictions. That is fixed now, along with a comment explaining why that is important.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Check any applicable: