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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user