Python pytest

From John Freier
Jump to: navigation, search

To run tests in a specific dir

 pytest path/to/dir

To run tests in a specific file

 pytest path/to/test_file.py

To run a specific test in a file

 pytest path/to/test_file.py::test_function

To show the print statements.

 -s or --capture=no