summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2017-01-22 22:19:38 -0800
committerGregory P. Smith <greg@krypto.org>2017-01-22 22:19:38 -0800
commit8c5f04bfe2d9f102359786a092475238233b8401 (patch)
tree1541d5007bc4e9ced1d2945121428e8b215dfcff /Lib
parent3bca4dacf5a470c3dd4d3c8819d4b4583054d208 (diff)
downloadcpython-8c5f04bfe2d9f102359786a092475238233b8401.tar.gz
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
Diffstat (limited to 'Lib')
-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 65b7cce131..2dc03ee700 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.')