The idea of ​​run / debug py.test single test is not the whole set

I am creating a python test suite (using py.test). I code tests in Idea, and I don't know how to debug a single test.

enter image description here

This is my debugger setting. It runs the whole testuite. So I have to run all the tests before it gets into the one I'm trying to debug.

+4
source share
1 answer

In your configuration, install:

  • The goal of the relative path of one of your test files, i.e. testsuite/psa/test_psa_integration.py
  • Keywords for a keyword that identifies those tests that you are trying to run specifically. If tests are part of a class, the keywords should look something like this:TestPsaIntegration and test_psa_integration_example

IntelliJ, PyCharm , Run/Debug .

PyCharm, : Preferences (or Settings) > Tools > Python Integrated Tools Default test runner py.test.

, (.. test_psa_integration.py), Run 'py.test in ...', Debug 'py.test in...', Run/Debug, .

+6

All Articles