diff options
author | Gregory P. Smith <greg@krypto.org> | 2017-01-22 22:19:51 -0800 |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2017-01-22 22:19:51 -0800 |
commit | 9358a6e62b32b6287cd0ecd478f4914d16beba5a (patch) | |
tree | 88d61b0c878d235cec499a2be3db8d4fe2288e06 | |
parent | 21a9b1dfc6bac8b77f511a02317a92a4feab576e (diff) | |
parent | 1fa08bcbbbe81d87b5e4fad6103ce5dc95766a5a (diff) | |
download | cpython-git-9358a6e62b32b6287cd0ecd478f4914d16beba5a.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
-rw-r--r-- | Lib/test/test_subprocess.py | 7 |
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.') |