summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2017-01-22 22:19:51 -0800
committerGregory P. Smith <greg@krypto.org>2017-01-22 22:19:51 -0800
commit06100f2d9d19f6d7eb5440aa1edff598d24a2775 (patch)
treeccbfa926807b72ffd0880c3d7a64c0a908170398 /Lib
parent8dec935b83b2a1df9a265d7c1357759a32f111f6 (diff)
parent8c5f04bfe2d9f102359786a092475238233b8401 (diff)
downloadcpython-06100f2d9d19f6d7eb5440aa1edff598d24a2775.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 d747845bc9..e63f9f254c 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -4,7 +4,6 @@ from test import support
import subprocess
import sys
import platform
-import ctypes
import signal
import io
import os
@@ -19,6 +18,11 @@ import gc
import textwrap
try:
+ import ctypes
+except ImportError:
+ ctypes = None
+
+try:
import threading
except ImportError:
threading = None
@@ -2504,6 +2508,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.')