- Node.js (>= 8.10.0), npm >= 5.8.0
- Python 2.7 or Python >= 3.4 (required only for testing the extension and running tests)
- Windows, macOS, or Linux
- Visual Studio Code
git clone https://github.com/kondratyev-nv/vscode-python-test-adapter
cd vscode-python-test-adapter
npm ciTo run tests from the VS Code you will also need additional python modules to be installed
python -m pip install --upgrade -r requirements.txtRun the Build tasks from the Command Palette (short cut CTRL+SHIFT+B or ⇧⌘B)
You can also compile from the command-line:
npm run buildTypeScript errors and warnings will be displayed in the Problems window of Visual Studio Code.
To test the changes, launch a development version of VS Code using the Run extension launch option.
To run tests, run Extension tests launch option. It will execute integration tests for Python that is used by default in the environment using python command. Since this pytest module should be importable. Results of the tests are shown in Debug Console.
To run your tests against multiple python versions the Tox can be used. The following commands will install Tox module, then run tests using virtual environments py27 and py37.
python -m pip install tox
python -m toxTo run tests against some other python version, for example Python 36, use
python -m tox -e py36To ensure python version that is used in tests look for a similar line in the test output
Using python /usr/bin/python 2.7.15rc1