Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing a lot of output can be expensive #6

Open
JesseDeLoore opened this issue Mar 25, 2023 · 1 comment
Open

Printing a lot of output can be expensive #6

JesseDeLoore opened this issue Mar 25, 2023 · 1 comment

Comments

@JesseDeLoore
Copy link

If you have a lot of warnings in your test suite, because you use, for example, some legacy function of your framework and the deprecation warning is printed (multiple times) for each test PyTest can take a lot of CPU and Memory to process your output.
--ignore-warnings will not help because the warnings are first parsed and then ignored.
The python argument -Wonce will still print all warnings once, so you don't lose track of what you need to upgrade, but not incur as much overhead

Another example of output slowing down your test suite is when you compare large objects (e.g. output files at byte level) in an assert. Pytest will try to find all differences for you and print them. If the file is large it will take considerable time to complete. It might even make your CI runner time out

@zupo
Copy link
Owner

zupo commented Mar 25, 2023

Could you make a PR for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants