Running the following command:
pytest -q --secret-input SUPER_SECRET_VALUE
produces the following output
F [100%]
============================================================================================== FAILURES ==============================================================================================
_________________________________________________________________________________________ test_failing_func __________________________________________________________________________________________
secret_input = 'SUPER_SECRET_VALUE'
def test_failing_func(secret_input):
> assert False
E assert False
tests/test_fail.py:2: AssertionError
====================================================================================== short test summary info =======================================================================================
FAILED tests/test_fail.py::test_failing_func - assert False
1 failed in 0.11s
whereas running
pytest -q --secret-input SUPER_SECRET_VALUE --tb=short
suppresses the printing of the secret_input
F [100%]
============================================================================================== FAILURES ==============================================================================================
_________________________________________________________________________________________ test_failing_func __________________________________________________________________________________________
tests/test_fail.py:2: in test_failing_func
assert False
E assert False
====================================================================================== short test summary info =======================================================================================
FAILED tests/test_fail.py::test_failing_func - assert False
1 failed in 0.10s