summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2017-01-23 06:19:38 (GMT)
committerGregory P. Smith <greg@krypto.org>2017-01-23 06:19:38 (GMT)
commit1fa08bcbbbe81d87b5e4fad6103ce5dc95766a5a (patch)
tree62c6250f869c8d8bf8a06e3b056eb00c736b4e36
parent21d333b7037b9d1283981590d10fad4b59477dc3 (diff)
downloadcpython-1fa08bcbbbe81d87b5e4fad6103ce5dc95766a5a.zip
cpython-1fa08bcbbbe81d87b5e4fad6103ce5dc95766a5a.tar.gz
cpython-1fa08bcbbbe81d87b5e4fad6103ce5dc95766a5a.tar.bz2
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
-rw-r--r--Lib/test/test_subprocess.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 65b7cce..2dc03ee 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -5,7 +5,6 @@ from test import support
import subprocess
import sys
import platform
-import ctypes
import signal
import io
import locale
@@ -23,6 +22,11 @@ import gc
import textwrap
try:
+ import ctypes
+except ImportError:
+ ctypes = None
+
+try:
import threading
except ImportError:
threading = None
@@ -2454,6 +2458,7 @@ class POSIXProcessTestCase(BaseTestCase):
'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.')