@pytest.hookimpl(hookwrapper=True)
def pytest_load_initial_conftests(early_config, parser, args):
    _readline_workaround()
    ns = early_config.known_args_namespace
    pluginmanager = early_config.pluginmanager
    capman = CaptureManager(ns.capture)
    pluginmanager.register(capman, "capturemanager")

    # make sure that capturemanager is properly reset at final shutdown
    early_config.add_cleanup(capman.reset_capturings)

    # 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.init_capturings()
    outcome = yield
    out, err = capman.suspendcapture()
    if outcome.excinfo is not None:
        sys.stdout.write(out)
        sys.stderr.write(err)
dataset/ETHPy150Open pytest-dev/pytest/_pytest/capture.py/pytest_load_initial_conftests/original