Forrest logo
back to the pytest tool

pytest:tldr:cc519

pytest: Run tests without capturing output.
$ pytest --capture=no
try on your machine

The command "pytest --capture=no" is used to execute test cases written in Python using the pytest testing framework.

Here's the explanation of the command:

  • "pytest": This is the command to run the pytest testing framework.
  • "--capture=no": This is an option that configures how the output of tests is captured. By default, pytest captures the output produced during test execution, such as print statements. However, using "--capture=no" disables this capture feature and allows the output to be displayed directly on the console.

So, when you run "pytest --capture=no" in the terminal or command prompt, pytest will collect and execute the test cases found in the current directory and any subdirectories. The "--capture=no" option ensures that the output produced by the tests is displayed in real-time during the test execution.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the pytest tool