summaryrefslogtreecommitdiff
path: root/testing/test_capture.py
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-10-29 15:18:29 +0100
committerDaniel Hahler <git@thequod.de>2019-10-29 15:25:15 +0100
commit8c21416798af488da173b2b1c98b5435c0865660 (patch)
tree4a21512523ec908a263cbb89f655610c763770b4 /testing/test_capture.py
parent0225cb37c02b6760c8b1d0efcf3728f669bbfe17 (diff)
downloadpytest-8c21416798af488da173b2b1c98b5435c0865660.tar.gz
lsof_check: include exc with skip message
Diffstat (limited to 'testing/test_capture.py')
-rw-r--r--testing/test_capture.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/testing/test_capture.py b/testing/test_capture.py
index 67aa0c77e..a79b4077b 100644
--- a/testing/test_capture.py
+++ b/testing/test_capture.py
@@ -905,9 +905,9 @@ def lsof_check():
pid = os.getpid()
try:
out = subprocess.check_output(("lsof", "-p", str(pid))).decode()
- except (OSError, subprocess.CalledProcessError, UnicodeDecodeError):
+ except (OSError, subprocess.CalledProcessError, UnicodeDecodeError) as exc:
# about UnicodeDecodeError, see note on pytester
- pytest.skip("could not run 'lsof'")
+ pytest.skip("could not run 'lsof' ({!r})".format(exc))
yield
out2 = subprocess.check_output(("lsof", "-p", str(pid))).decode()
len1 = len([x for x in out.split("\n") if "REG" in x])