summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2017-01-22 22:20:04 -0800
committerGregory P. Smith <greg@krypto.org>2017-01-22 22:20:04 -0800
commit9c3975f9fe0633faf8e4ea11ccd03d5b3109498e (patch)
treee4c3ea79d9db79d39e4b3957cee9727ac18627e6 /Lib
parent8c9fc55ad73c88efbbdfc75d45ba62919d9cb1d0 (diff)
parent06100f2d9d19f6d7eb5440aa1edff598d24a2775 (diff)
downloadcpython-9c3975f9fe0633faf8e4ea11ccd03d5b3109498e.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 fd865d7585..82e0b870af 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.')