output capturing
pytest's default behaviour of holding back anything a test prints and showing it only if the test fails.
In more detail
The -s option, short for --capture=no, turns capturing off so print output reaches the screen as it happens. The course uses it to watch the order in which fixtures are built and torn down.
Example
pytest -q -s test_scope.pyRelated terms
- standard output and standard error — The two channels a program writes normal output (stdout) and error messages (stderr) to, plus stdin for input.
- fixture — A named piece of setup, defined with @pytest.fixture, that a test receives by listing the fixture's name as a parameter.
Taught in
- Fixtures And Their Scope — Automated Testing, TDD & Quality Engineering