How To Run A Single Test In Pytest (Using CLI And Markers)
You’ve written code and Unit tests, and want to make sure it works. You simply run the pytest
command in your terminal to run them the tests. Boom! some tests fail.
How do you debug it?
To debug, it’s sometimes helpful to run one test, run tests in a specific module or class, or run tests based on a marker.
But how do you run just a single test?