-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Default to UseAutomaticVirtualEnv in integration tests #6318
Conversation
cbf8252
to
4833566
Compare
} | ||
} else { | ||
if err = pt.preparePythonProjectWithPipenv(cwd); err != nil { | ||
[]string{"python", "-m", "pip", "install", "-r", "requirements.txt"}, cwd); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this here to match what we do inside the Python SDK, running it as python -m pip install
rather than pip install
.
Line 231 in 066507c
pipCmd := VirtualEnvCommand(venvDir, "python", append([]string{"-m", "pip", "install"}, arg...)...) |
Do we need the Pulumi.yaml file to be updated before the venv will be created or am I conflating 2 separate things here? |
No. The integration test code will handle that automatically. pulumi/pkg/testing/integration/program.go Lines 1744 to 1748 in 066507c
It doesn't hurt for the |
This way, the tests use the built-in virtual environment support by default, which is what most customers will be using. A new `UsePipenv` option is available to go back to using pipenv for tests.
4833566
to
287a755
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! The set of PR tests and master should help us get some mileage around this :)
This way, the tests use the built-in virtual environment support by default, which is what most customers will be using. A new
UsePipenv
option is available to go back to using pipenv for tests.