(early_config: Config)
| 126 | |
| 127 | @hookimpl(hookwrapper=True) |
| 128 | def pytest_load_initial_conftests(early_config: Config): |
| 129 | ns = early_config.known_args_namespace |
| 130 | if ns.capture == "fd": |
| 131 | _py36_windowsconsoleio_workaround(sys.stdout) |
| 132 | _colorama_workaround() |
| 133 | pluginmanager = early_config.pluginmanager |
| 134 | capman = CaptureManager(ns.capture) |
| 135 | pluginmanager.register(capman, "capturemanager") |
| 136 | |
| 137 | # Make sure that capturemanager is properly reset at final shutdown. |
| 138 | early_config.add_cleanup(capman.stop_global_capturing) |
| 139 | |
| 140 | # Finally trigger conftest loading but while capturing (issue #93). |
| 141 | capman.start_global_capturing() |
| 142 | outcome = yield |
| 143 | capman.suspend_global_capture() |
| 144 | if outcome.excinfo is not None: |
| 145 | out, err = capman.read_global_capture() |
| 146 | sys.stdout.write(out) |
| 147 | sys.stderr.write(err) |
| 148 | |
| 149 | |
| 150 | # IO Helpers. |
nothing calls this directly
no test coverage detected