Replies: 1 comment 4 replies
-
You should neither configure logging nor warnings as that messes around with global state and in part sabotages pytest correctly setting up logging /warning capture |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The setup:
This works as expected (warning is captured as log message):
However, if I move the warning configuration into
pytest_configure
(which I think is the better place for it), it no longer takes effect:Is this expected behavior? If so, what's the recommended place to configure logging?
Beta Was this translation helpful? Give feedback.
All reactions