-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Labels
Milestone
Description
Refs: #686
- macOS @TylerLeonhardt
- linux @chrmarti
- windows @karthiknadig
Complexity: 4
Author: @eleanorjboyd
The goal of this TPI is to test the new support for pipenv virtual environment management in the python environments extension
setup:
- install the python environments extension if you haven't already (make sure it is on the pre-release version
- add
python.useEnvironmentsExtension: true
to your user settings - install pipenv on your device https://pipenv.pypa.io/en/latest/installation.html
test steps:
- create a new virtual environment with pipenv, do so by:
- opening a new project (folder)
- running
pipenv install pytest
this will create a new env and install thepytest
package in it
- go to the "python" tab in the sidebar (has the python logo)
- click reload on your environment managers

- verify you can see the environment you created with pipenv and that pipenv shows up on your list of environment managers
- click the dropdown on the environment and verify you see
pytest
listed as an installed package
steps to confirm all actions (buttons) for terminal work:

- hover over the pipenv env listed to see the path of the environment. You will then use this path in next steps to confirm that the correct environment (that one) is activated / used in the following actions
- click terminal icon to "Create python terminal", now verify this terminal is activated correctly by calling
which python
orwhere python
and confirming it is the env you created - click to pkg icon to "install a package", select one of your choosing, verify it gets installed without issue (should show in the dropdown on the environment)
- click the checkmark to "set as project environment"
- create a python file, put the following contents in it, click the play button dropdown and select "debug file"
- verify the script outputs the correct environment you saw in earlier steps
import sys
print("python sys.executable:", sys.executable)
