You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see there are a number of issues on the tracker around this, both open and closed, with some closed ones implying this behaviour should no longer be occurring. I'd like to get some clarity on the current status of things and any expected changes coming up.
I am currently using pytest 9.0.2.
Currently if, for example, log_level in the ini file is set to INFO and a test calls caplog.set_level(logging.DEBUG) (or uses the equivalent at_level context manager), this does not log any messages at the DEBUG level during the test. The global INFO setting still applies.
When I went looking for answers on this I found #7133, which looked like this exact problem and seemed to have already been solved in pull request #7340. Unless I'm missing something, I still have the same issue though. I see there are other open issues such as #7162 which seem to be talking about the same/a similar thing, but as I dig around and find more of them they get a bit further into the pytest internals than I'm familiar with as a user rather than a developer of the package.
Is what I'm seeing expected behaviour, or did the bug from 6 years ago rear its head again at some point?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I see there are a number of issues on the tracker around this, both open and closed, with some closed ones implying this behaviour should no longer be occurring. I'd like to get some clarity on the current status of things and any expected changes coming up.
I am currently using pytest 9.0.2.
Currently if, for example,
log_levelin the ini file is set toINFOand a test callscaplog.set_level(logging.DEBUG)(or uses the equivalentat_levelcontext manager), this does not log any messages at theDEBUGlevel during the test. The globalINFOsetting still applies.When I went looking for answers on this I found #7133, which looked like this exact problem and seemed to have already been solved in pull request #7340. Unless I'm missing something, I still have the same issue though. I see there are other open issues such as #7162 which seem to be talking about the same/a similar thing, but as I dig around and find more of them they get a bit further into the pytest internals than I'm familiar with as a user rather than a developer of the package.
Is what I'm seeing expected behaviour, or did the bug from 6 years ago rear its head again at some point?
Beta Was this translation helpful? Give feedback.
All reactions