Skip to content

fix: move calls requiring integ test environment setup from test setup to inside test body #256

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

Merged
merged 3 commits into from
Apr 18, 2020
Merged

Conversation

mattsb42-aws
Copy link
Member

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:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

@alex
Copy link
Contributor

alex commented Apr 17, 2020

flake8 appears unhappy

@mattsb42-aws
Copy link
Member Author

flake8 appears unhappy

That's expected; in the process of moving our non-integ tests from Travis to GitHub, I enabled some checks on the test vector handler sub-module that were previously disabled. They're currently expected to fail (and so not required) but enabled to remind me to fix them.

@mattsb42-aws mattsb42-aws merged commit b70d397 into aws:master Apr 18, 2020
@mattsb42-aws mattsb42-aws deleted the pyca-fix branch April 18, 2020 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants