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

[release-2.0] Backport test fixes #871

Merged

Conversation

Shrews and others added 5 commits October 14, 2021 18:08
remove section for autopep8 since we don't use it
Change flake8 settings to exclude excludes since the default list of excluded files is good
Using the mocker fixture rather than unittest.Mock directly has a number of benefits. The tests read easier since context managers within tests are unnecessary and patches are automatically scoped to the test where the fixture is used.

Also overhaul the tests in test___main__.py to test the code as intended.
Use pytest-mock and tmp_path fixtures
Mock test environment variables to prevent inconsistent test results
Reformat test fixtures so they are easier to read
@samdoran samdoran added the gate label Oct 15, 2021
Copy link
Contributor

@ansible-zuul ansible-zuul bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ansible-zuul ansible-zuul bot merged commit 5a8bbb3 into ansible:release_2.0 Oct 15, 2021
@samdoran samdoran deleted the backport/release_2.0/test-fixes branch October 15, 2021 17:53
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