Commit 9358a6e6 authored by Gregory P. Smith's avatar Gregory P. Smith

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
parents 21a9b1df 1fa08bcb
...@@ -4,7 +4,6 @@ from test import support ...@@ -4,7 +4,6 @@ from test import support
import subprocess import subprocess
import sys import sys
import platform import platform
import ctypes
import signal import signal
import io import io
import os import os
...@@ -18,6 +17,11 @@ import shutil ...@@ -18,6 +17,11 @@ import shutil
import gc import gc
import textwrap import textwrap
try:
import ctypes
except ImportError:
ctypes = None
try: try:
import threading import threading
except ImportError: except ImportError:
...@@ -2504,6 +2508,7 @@ class POSIXProcessTestCase(BaseTestCase): ...@@ -2504,6 +2508,7 @@ class POSIXProcessTestCase(BaseTestCase):
'Linux': 'so.6', 'Linux': 'so.6',
'Darwin': 'dylib', 'Darwin': 'dylib',
} }
@unittest.skipIf(not ctypes, 'ctypes module required.')
@unittest.skipIf(platform.uname()[0] not in _libc_file_extensions, @unittest.skipIf(platform.uname()[0] not in _libc_file_extensions,
'Test requires a libc this code can load with ctypes.') 'Test requires a libc this code can load with ctypes.')
@unittest.skipIf(not sys.executable, 'Test requires sys.executable.') @unittest.skipIf(not sys.executable, 'Test requires sys.executable.')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment