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

capture: do not set logging.raiseExceptions = False #4943

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/4942.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
``logging.raiseExceptions`` is not set to ``False`` anymore.
7 changes: 0 additions & 7 deletions src/_pytest/capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ def pytest_load_initial_conftests(early_config, parser, args):
# make sure that capturemanager is properly reset at final shutdown
early_config.add_cleanup(capman.stop_global_capturing)

# 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)

# finally trigger conftest loading but while capturing (issue93)
capman.start_global_capturing()
outcome = yield
Expand Down