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

Allowpython_tests() to set environment variables #12022

Merged
merged 1 commit into from
May 6, 2021

Conversation

rhysyngsun
Copy link
Contributor

Closes #11638

This adds support for designating environment variables at the python_tests level in a similar manner to how they can be currently set at the global level. Variables set via python_tests will override those defined by [tests].extra_env_vars.

[ci skip-rust]

[ci skip-build-wheels]
Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Awesome stuff! Thanks! Will merge on green CI and cherry pick to 2.5 so it makes it in the first stable release.

@Eric-Arellano Eric-Arellano requested a review from benjyw May 6, 2021 14:56
@Eric-Arellano Eric-Arellano merged commit b547a6f into pantsbuild:main May 6, 2021
Eric-Arellano pushed a commit to Eric-Arellano/pants that referenced this pull request May 6, 2021
Closes pantsbuild#11638

This adds support for designating environment variables at the `python_tests` level in a similar manner to how they can be currently [set at the global level](https://www.pantsbuild.org/docs/python-test-goal#setting-environment-variables). Variables set via `python_tests` will override those defined by `[tests].extra_env_vars`.

[ci skip-rust]
@benjyw
Copy link
Contributor

benjyw commented May 6, 2021

Looks great! Thanks @rhysyngsun !

Eric-Arellano added a commit that referenced this pull request May 6, 2021
@rhysyngsun rhysyngsun deleted the python-tests-extra-envs branch May 6, 2021 18:37
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.

Add support for setting per-test environment variables
3 participants