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

test: properly mock the environment #1385

Merged
merged 1 commit into from
Sep 22, 2024

Conversation

tonyandrewmeyer
Copy link
Contributor

These two tests change os.environ without restoring it afterwards, which means that the changes leak into other tests. Change that by using monkeypatch.setenv.

@tonyandrewmeyer tonyandrewmeyer marked this pull request as ready for review September 22, 2024 22:46
@tonyandrewmeyer
Copy link
Contributor Author

This should fix the issue in #1381.

@tonyandrewmeyer tonyandrewmeyer changed the title tests: properly mock the environment test: properly mock the environment Sep 22, 2024
@tonyandrewmeyer tonyandrewmeyer merged commit 4bb92dd into canonical:main Sep 22, 2024
29 of 30 checks passed
@tonyandrewmeyer tonyandrewmeyer deleted the fix-leaky-tests branch September 22, 2024 23: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