cpython/Lib/ctypes/test
Martin Panter bfb15ab711 Issue #22636: avoid using a shell in the ctypes.util module
Replace os.popen() with subprocess.Popen. Based on patch by Victor Stinner.

If the "gcc", "cc" or "objdump" command is not available, the code was
supposed to raise an OSError exception. But there was a bug in the code. The
shell code returns the exit code 10 if the required command is missing, and the
code tries to check for the status 10. The problem is that os.popen() doesn't
return the exit code directly, but a status which should be processed by
os.WIFEXITED() and os.WEXITSTATUS(). In practice, the exception was never
raised. The OSError exception was not documented and ctypes.util.find_library()
is expected to return None if the library is not found.
2016-06-14 01:27:11 +00:00
..
__init__.py Issue #22060: Clean up/simplify test_ctypes, use test discovery 2014-08-08 13:32:16 -05:00
__main__.py Issue #22060: Clean up/simplify test_ctypes, use test discovery 2014-08-08 13:32:16 -05:00
test_anon.py
test_array_in_pointer.py
test_arrays.py Issue #19023: Document ctypes array and pointer classes 2016-01-29 10:12:19 +00:00
test_as_parameter.py Issue #19235: Add new RecursionError exception. Patch by Georg Brandl. 2015-07-03 01:04:23 -04:00
test_bitfields.py Issue #23319: Fix ctypes.BigEndianStructure, swap correctly bytes. Patch 2015-07-29 14:33:52 +02:00
test_buffers.py Issue #22161: Conformed arguments type checks in ctype to actually supported 2014-08-09 09:33:05 +03:00
test_bytes.py Issue #22161: Conformed arguments type checks in ctype to actually supported 2014-08-09 09:33:05 +03:00
test_byteswap.py Issue #22098: ctypes' BigEndianStructure and LittleEndianStructure now define an empty __slots__ so that subclasses don't always get an instance dict. 2014-08-30 00:37:18 +02:00
test_callbacks.py Issue #19493: Refactor ctypes test package. 2014-06-13 13:44:39 -05:00
test_cast.py Issue #19493: Refactor ctypes test package. 2014-06-13 13:44:39 -05:00
test_cfuncs.py Issue #19493: Refactor ctypes test package. 2014-06-13 13:44:39 -05:00
test_checkretval.py Issue #19493: Refactor ctypes test package. 2014-06-13 13:44:39 -05:00
test_delattr.py
test_errno.py
test_find.py Issue #22636: avoid using a shell in the ctypes.util module 2016-06-14 01:27:11 +00:00
test_frombuffer.py Issue #25498: Update error message for 3.5 2015-11-13 22:12:58 +00:00
test_funcptr.py Issue #19591: Use specific asserts in ctype tests. 2013-11-16 23:51:26 +02:00
test_functions.py Issue #19493: Refactor ctypes test package. 2014-06-13 13:44:39 -05:00
test_incomplete.py
test_init.py
test_internals.py
test_keeprefs.py Issue #19493: Refactor ctypes test package. 2014-06-13 13:44:39 -05:00
test_libc.py
test_loading.py Issue #23606: Temporarily suppress test for CRT name. 2015-03-14 11:48:44 -07:00
test_macholib.py Issue #19493: Refactor ctypes test package. 2014-06-13 13:44:39 -05:00
test_memfunctions.py Issue #19493: Refactor ctypes test package. 2014-06-13 13:44:39 -05:00
test_numbers.py Issue #19493: Refactor ctypes test package. 2014-06-13 13:44:39 -05:00
test_objects.py Issue #19493: Refactor ctypes test package. 2014-06-13 13:44:39 -05:00
test_parameters.py Issue #19493: Refactor ctypes test package. 2014-06-13 13:44:39 -05:00
test_pep3118.py support pep 3118 format strings for ctypes objects with nontrivial shapes (closes #10744) 2014-05-17 14:59:12 -07:00
test_pickling.py Issue #22777: Test pickling with all protocols. 2014-12-15 14:03:42 +02:00
test_pointers.py Issue #19023: Document ctypes array and pointer classes 2016-01-29 10:12:19 +00:00
test_prototypes.py #22732 ctypes tests don't set correct restype for intptr_t functions 2014-11-01 15:14:27 -07:00
test_python_api.py Issue #22060: Clean up/simplify test_ctypes, use test discovery 2014-08-08 13:32:16 -05:00
test_random_things.py Issue #25523: Further a-to-an corrections. 2015-11-02 14:10:23 +02:00
test_refcounts.py Issue #19591: Use specific asserts in ctype tests. 2013-11-16 23:51:26 +02:00
test_repr.py
test_returnfuncptrs.py
test_simplesubclasses.py
test_sizes.py
test_slicing.py Issue #19493: Refactor ctypes test package. 2014-06-13 13:44:39 -05:00
test_stringptr.py
test_strings.py Issue #19493: Refactor ctypes test package. 2014-06-13 13:44:39 -05:00
test_struct_fields.py
test_structures.py Issue #22161: Conformed arguments type checks in ctype to actually supported 2014-08-09 09:33:05 +03:00
test_unaligned_structures.py
test_unicode.py Issue #19493: Refactor ctypes test package. 2014-06-13 13:44:39 -05:00
test_values.py Issue #25533: Update documentation regarding the frozen modules table 2016-05-15 00:13:04 +00:00
test_varsize_struct.py
test_win32.py Issue #25582: Fixed 100 MB memory leak in test_ctypes. 2015-11-09 22:31:10 +02:00
test_wintypes.py Issue #19493: Refactor ctypes test package. 2014-06-13 13:44:39 -05:00