-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
pytest leaks all logging output #3046
Comments
GitMate.io thinks the contributor most likely able to help you is @nicoddemus. |
I'm seeing this too; log level is getting set to 0 somewhere between
|
Note: from searching, the only Lines 88 to 103 in 30729b7
|
Update: after gutting every single function that called |
Note: after some debugging, I found that the logger level has nothing to do with this; it's set in both cases to zero and output is captured for one but not for the other. |
I'm using pytest 3.3.1 and see different behavior for the exact same project in OS X and Windows. Windows leaks all the logs while OS X doesn't, even if there are no failing tests on either. For example, running just |
Actually, let me provide a bit more information. The logs leak in Windows when I'm running with the xdist plugin to run the tests on 2 CPUs. I'm using pytest-xdist 1.21.0 so maybe my issue is with the plugin and not pytest itself. See these these issues for more details: |
The problem here actually is setting the level to 0, via:
(with pdbpp you can use It sets the level to 0, which enables all message for non-configured loggers I've not really investigated, but it looked like this happens only after the first test - before this It seems like the root logger needs to get changed to actually see messages, but maybe then existing handlers could get a filter attached to respect the original level? (I've noticed this when using |
This will be fixed by #3124: the log level will no longer set to |
This is slightly different than the previous issue. If I run
pytest tests/unit
in the root directory of pyinstaller, logging that has a level of WARNING or higher is leaked. That's fine; there are existing plans for that issue. But if I just runpytest
(with no arguments), I encounter a much more serious issue: all logging is printed. On a typical pyinstaller test run, we typically have 50k lines of logging output (estimated); so much output that appveyor truncates the logs.Please let me know what details you need.
The text was updated successfully, but these errors were encountered: