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
This commit is contained in:
Gregory P. Smith 2017-01-22 22:20:04 -08:00
commit 60e6e962ba
1 changed files with 6 additions and 1 deletions

View File

@ -4,7 +4,6 @@ from test import support
import subprocess
import sys
import platform
import ctypes
import signal
import io
import os
@ -18,6 +17,11 @@ import shutil
import gc
import textwrap
try:
import ctypes
except ImportError:
ctypes = None
try:
import threading
except ImportError:
@ -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.')