[BUG]: test_iostream is flaky on Windows (capfd captures empty output)
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start in tests/test_iostream.py at test_redirect, test_redirect_err, test_redirect_reentry and test_err, the four cases named in the two failing jobs, and read the raw_output binding they call into before touching anything. Reproduce on a Windows runner (windows-2022, MSVC 2022 C++20, x64) with pytest tests/test_iostream.py run repeatedly, since the failure is intermittent and the cause is not yet known. Done means those tests stop returning empty output from capfd.readouterr() across repeated Windows CI runs; treat this as investigation first, so the outcome may be a fix in the test, the binding, or both.
由索引模型根据 Issue 内容生成。
描述
🤖 AI text below 🤖
tests/test_iostream.py fails intermittently on Windows CI. capfd.readouterr() returns an empty string for output written directly to std::cout / std::cerr. The failures are not related to the changes under test.
Occurrences:
- PR #1043,
🐍 3.9 • MSVC 2022 C++20 • x64:test_redirect,test_redirect_err,test_redirect_reentry(job) masterat 0066b394 (scheduled run, 2026-11-18),⚡ (windows-2022, 3.13):test_err(job)
Example:
def test_redirect(capfd):
msg = "Should not be in log!"
stream = StringIO()
with redirect_stdout(stream):
m.raw_output(msg)
stdout, _stderr = capfd.readouterr()
> assert stdout == msg
E AssertionError: assert '' == 'Should not be in log!'
All assertions that fail are on unredirected C++ stream output read through capfd. The cause is not known.
- 主要语言
- C++
- 星标
- 18k
- 派生
- 2.3k
- 平均合并
- 5 天 7 小时
- 30 天内合并 PR
- 53
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pybind/pybind11 的其他 Issue
-
triage
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 3 天内回复
-
triage
难度 1/5 1 小时以内 新手友好度 62/100
pybind/pybind11#5604 · 1 条评论 ·
维护者通常 3 天内回复
-
triage
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 3 天内回复
-
docs
难度 2/5 1-3 小时 新手友好度 60/100
维护者通常 3 天内回复
-
array_t::at() returns a misaligned reference when the stride is not a multiple of alignof(T)可能已有人在做 @henryiii 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
维护者通常 3 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
patrick-hudson/put.gd-desktop#2044 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
uxlfoundation/oneDNN#6604 · 1 条评论 ·
维护者通常 2 天内回复
-
[Bug]: RoundToNearest truncates in plugins compiled with spcomp 1.13可能已有人在做 @fmu1337 今天认领。 未关闭Bug
难度 2/5 1-3 小时 新手友好度 62/100
alliedmodders/sourcemod#2627 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 75/100
维护者通常 1 天内回复