From b6ccdc953d22034750f19b4d5fb136b79ec3940a Mon Sep 17 00:00:00 2001 From: Dean Moldovan Date: Mon, 22 Aug 2016 23:09:00 +0200 Subject: [PATCH] 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. --- .appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.appveyor.yml b/.appveyor.yml index 688a92efc..4ea654742 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -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%