简体   繁体   中英

How to built-in run python tox command and test in visual studio code

I have tox.ini in my project, and I want for running and showing test in visual studio code, using python tox, but I don't know how to do it?

As far as I know there is no tox extension for VS Code.

I just open the integrated terminal within VS Code and run it.

You can also run any external tool, eg tox via a so-called task, see https://code.visualstudio.com/docs/editor/tasks

Update: since June 2021 there is a Visual Studio Code extension for tox: python-tox .

To use:

  1. Install the extension
  2. Ensure that tox is installed in the base version of Python running on your OS
  3. Open the command palette (Cmd-Shift-P on a Mac)
  4. Type tox
  5. Select from one of the available commands (see the extension homepage for details)

Disclaimer: I am not the author of the extension, but kudos to the author.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM