Commit b6ccdc95 authored by Dean Moldovan's avatar Dean Moldovan
Browse files

Workaround for random failure of pytest capture on Windows

pytest can capture test output both globally (controlled by the cmd line
flag --capture) or locally (`capsys` and `capfd` fixtures). Enabling both
methods at the same time causes problems on Windows: test output is not
captured sometimes, resulting in test failure. This happens seemingly at
random.

This workaround disables global output capture ("-s", i.e. "--capture=no")
leaving only the local capture fixtures. As a side-effect test output on
AppVeyor CI is a little messy, but this will have to do until a better
solution is found.
parent faec30c4
......@@ -29,4 +29,5 @@ install:
build_script:
- cmake -A "%CMAKE_ARCH%" -DPYBIND11_WERROR=ON
- set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- set PYTEST_ADDOPTS="-s" # workaround for pytest capture issue, see #351
- cmake --build . --config Release --target pytest -- /v:m /logger:%MSBuildLogger%
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment