[Python-checkins] cpython (3.5): Skip the test requiring ctypes if ctypes is unavailable.
gregory.p.smith
python-checkins at python.org
Mon Jan 23 01:20:14 EST 2017
https://hg.python.org/cpython/rev/15fff7b86eeb
changeset: 106276:15fff7b86eeb
branch: 3.5
parent: 106273:2afdb08b3fb4
user: Gregory P. Smith <greg at krypto.org>
date: Sun Jan 22 22:19:38 2017 -0800
summary:
Skip the test requiring ctypes if ctypes is unavailable.
prevents http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/240/steps/test/logs/stdio
files:
Lib/test/test_subprocess.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -5,7 +5,6 @@
import subprocess
import sys
import platform
-import ctypes
import signal
import io
import locale
@@ -23,6 +22,11 @@
import textwrap
try:
+ import ctypes
+except ImportError:
+ ctypes = None
+
+try:
import threading
except ImportError:
threading = None
@@ -2454,6 +2458,7 @@
'Linux': 'so.6',
'Darwin': 'dylib',
}
+ @unittest.skipIf(not ctypes, 'ctypes module required.')
@unittest.skipIf(platform.uname()[0] not in _libc_file_extensions,
'Test requires a libc this code can load with ctypes.')
@unittest.skipIf(not sys.executable, 'Test requires sys.executable.')
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list