summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2017-01-23 06:20:04 (GMT)
committerGregory P. Smith <greg@krypto.org>2017-01-23 06:20:04 (GMT)
commit60e6e962bac6a668d0df539ebf526a0a1c69eacd (patch)
treecc7ae36cac2e1760021532001fb7962ee62dcc56
parent773a8c4f8d009375dde45c76d47458534f5218ba (diff)
parent9358a6e62b32b6287cd0ecd478f4914d16beba5a (diff)
downloadcpython-60e6e962bac6a668d0df539ebf526a0a1c69eacd.zip
cpython-60e6e962bac6a668d0df539ebf526a0a1c69eacd.tar.gz
cpython-60e6e962bac6a668d0df539ebf526a0a1c69eacd.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 fd865d7..82e0b87 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
@@ -2491,6 +2495,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.')