Restore runs-on: windows-latest (#5835)

* Revert "s/windows-2022/windows-latest/ in .github/workflows/{ci,pip}.yml (#5826)"

This reverts commit 852a4b5010.

* Add module-level skip for Windows build >= 26100 in test_iostream.py

* Changes suggested by at-henryiii
This commit is contained in:
Ralf W. Grosse-Kunstleve
2025-09-12 21:52:44 -07:00
committed by GitHub
parent 937552f0ad
commit d4d555d9e0
3 changed files with 23 additions and 12 deletions

View File

@@ -6,8 +6,19 @@ from io import StringIO
import pytest
import env
from pybind11_tests import iostream as m
if env.WIN:
wv_build = sys.getwindowsversion().build
skip_if_ge = 26100
if wv_build >= skip_if_ge:
pytest.skip(
f"Windows build {wv_build} >= {skip_if_ge}:"
" Skipping iostream capture (redirection regression needs investigation)",
allow_module_level=True,
)
def test_captured(capsys):
msg = "I've been redirected to Python, I hope!"