Minor comment update

This commit is contained in:
Bruno Oliveira 2023-11-07 19:44:24 -03:00 committed by GitHub
parent f3a7dcb30b
commit 710f91d513
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -25,9 +25,9 @@ def pytest_addoption(parser: Parser) -> None:
def pytest_configure(config: Config) -> None: def pytest_configure(config: Config) -> None:
import faulthandler import faulthandler
# stash original stderr fileno to be restored at the end of the test session # Stash original stderr fileno to be restored at the end of the test session
# sys.stderr and sys.__stderr__ may be closed or patched during the session # sys.stderr and sys.__stderr__ may be closed or patched during the session
# so we can't rely on their values being good at that point # so we can't rely on their values being good at that point (#11572).
stderr_fileno = get_stderr_fileno() stderr_fileno = get_stderr_fileno()
config.stash[fault_handler_original_stderr_fd_key] = stderr_fileno config.stash[fault_handler_original_stderr_fd_key] = stderr_fileno
config.stash[fault_handler_stderr_fd_key] = os.dup(stderr_fileno) config.stash[fault_handler_stderr_fd_key] = os.dup(stderr_fileno)