Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

I want to turn off output in pytest console

I want to turn off output in Pytest console, so i can see only my logs
I tried pytest -x -s -tb=no but its not exactly what i want
I want to get rid of this output
======================================================== test session starts ========================================================= platform win32 -- Python 3.10.7, pytest-7.2.0, pluggy-1.0.0 rootdir: C:\Users\...\projects\autotest-lk\source collected 6 items

Any advices?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can use the -q or --quiet option in Pytest to suppress the header and summary output, while still allowing your test logs to be displayed. Here is an example command:

pytest -q

Alternatively, you can use the -r or --report option to customize the output that is displayed. For example, you can use -rN to only show the test names and status, like this:

pytest -rN

You can also combine the -q and -r options to suppress the header and summary output, while still showing the test names and status:

pytest -q -rN
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading