-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
plugin: capturerelated to the capture builtin pluginrelated to the capture builtin plugintype: bugproblem that needs to be addressedproblem that needs to be addressed
Description
I have found the following code, which was added in 2c7d005 by @hpk42, but apparently without a test:
Lines 59 to 64 in b3eb5d1
# make sure logging does not raise exceptions at the end | |
def silence_logging_at_shutdown(): | |
if "logging" in sys.modules: | |
sys.modules["logging"].raiseExceptions = False | |
early_config.add_cleanup(silence_logging_at_shutdown) |
A later commit (0719602) indicates that this might be because logging itself tries to close some fd.
I think it is bad practice to change module attributes, especially if it might indicate that pytest is/was doing something wrong itself.
Metadata
Metadata
Assignees
Labels
plugin: capturerelated to the capture builtin pluginrelated to the capture builtin plugintype: bugproblem that needs to be addressedproblem that needs to be addressed