Skip to content

Commit

Permalink
Skip the test requiring ctypes if ctypes is unavailable.
Browse files Browse the repository at this point in the history
  • Loading branch information
gpshead committed Jan 23, 2017
2 parents 773a8c4 + 9358a6e commit 60e6e96
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Lib/test/test_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import subprocess
import sys
import platform
import ctypes
import signal
import io
import os
Expand All @@ -18,6 +17,11 @@
import gc
import textwrap

try:
import ctypes
except ImportError:
ctypes = None

try:
import threading
except ImportError:
Expand Down Expand Up @@ -2491,6 +2495,7 @@ def test_communicate_BrokenPipeError_stdin_close_with_timeout(self):
'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.')
Expand Down

0 comments on commit 60e6e96

Please sign in to comment.