Workaround for cmdexec bug on Windows

This bug fails the entire pytest suite when executed with the
--lsof option in Python 2 on Windows.
This commit is contained in:
Bruno Oliveira
2015-07-24 19:21:57 -03:00
parent 9f94e443ff
commit 033def0a7a
2 changed files with 5 additions and 2 deletions

View File

@@ -650,7 +650,7 @@ def lsof_check():
try:
out = py.process.cmdexec("lsof -p %d" % pid)
except (py.process.cmdexec.Error, UnicodeDecodeError):
# about UnicodeDecodeError, see note on conftest.py
# about UnicodeDecodeError, see note on pytester
pytest.skip("could not run 'lsof'")
yield
out2 = py.process.cmdexec("lsof -p %d" % pid)