diff options
| author | robot-piglet <[email protected]> | 2025-09-02 11:39:17 +0300 |
|---|---|---|
| committer | robot-piglet <[email protected]> | 2025-09-02 12:11:07 +0300 |
| commit | cecd8d9462e9c1a58aeae25894aac3e9fa2e2e3a (patch) | |
| tree | c6ec848ab309e8f59251bcb65e0004a9d716d115 /library/python/pytest | |
| parent | 6b86d7dc64358c875dd5e7f92be10f2abe866511 (diff) | |
Intermediate changes
commit_hash:3226aa9d9f0af82e14a84916ce0f450ded26504f
Diffstat (limited to 'library/python/pytest')
| -rw-r--r-- | library/python/pytest/plugins/ya.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/library/python/pytest/plugins/ya.py b/library/python/pytest/plugins/ya.py index 9afb02185c7..8b763af783b 100644 --- a/library/python/pytest/plugins/ya.py +++ b/library/python/pytest/plugins/ya.py @@ -341,7 +341,9 @@ def _graceful_shutdown(*args): library.python.coverage.stop_coverage_tracing() except ImportError: pass - traceback.print_stack(file=sys.stderr) + stack = traceback.format_stack() + # NOTE: Using os.write because it's reentrant, Python I/O stack isn't https://bugs.python.org/issue24283 + os.write(sys.stderr.fileno(), b''.join(item.encode() for item in stack)) capman = pytest_config.pluginmanager.getplugin("capturemanager") capman.suspend(in_=True) _graceful_shutdown_on_log(not capman.is_globally_capturing()) |
