The -s switch disables per-test capturing (only if a test fails).
-s is equivalent to --capture=no.
The -s switch disables per-test capturing (only if a test fails).
-s is equivalent to --capture=no.
pytest captures the stdout from individual tests and displays them only on certain conditions, along with the summary of the tests it prints by default.
Extra summary info can be shown using the '-r' option:
pytest -rP
shows the captured output of passed tests.
pytest -rx
shows the captured output of failed tests (default behaviour).
The formatting of the output is prettier with -r than with -s.
Videos
On one laptop I have the pytest Test Results tab which outputs a verbose log and results. Like this picture.
After setting VSCode up on another computer I cannot get it to output the same. It just says "Finished Running Tests!". I have changed launch.json and setting.json to be the same. installed same extensions but nothing is working.
I cant seeting sync as the other machine isnt mine. Does anyone know how to enable this again?