Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added settings for pytest integration

...

  1. Install the Python Extension for VSCode
  2. Run the Python: Configure Tests command
  3. In Settings > Python > Testing: Pytest Args, add the --no-cov argument
  4. Run the Python: Discover Tests command
  5. This adds the Run Test | Debug Test buttons in VSCode with breakpoint integration

Alternatively, edit settings as follows, then run Python: Discover Tests

Code Block
languagejs
titlepytest settings
{
    "python.testing.unittestEnabled": false,
    "python.testing.nosetestsEnabled": false,
    "python.testing.pytestEnabled": true,
    "python.testing.pytestArgs": [
        "--no-cov"
    ]
}

Resources: 

...