Disable tests broken in python 2.4 and 2.5
These tests were added in2f8a7b82andfc8e7654in #572 and #573 but a change from a few months ago meant that the requested version of Python was not actually being used during testing when these were added.
This commit is contained in:
parent
b5b89c1294
commit
26d0b7f5b9
1 changed files with 8 additions and 3 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import ctypes
|
||||
import sys
|
||||
from primitive_types import *
|
||||
|
||||
|
|
@ -443,6 +442,11 @@ if v != 4:
|
|||
# Check the bounds for converting various types
|
||||
#
|
||||
|
||||
# ctypes not available until 2.5
|
||||
if sys.version_info[0:2] <= (2, 4):
|
||||
sys.exit(0)
|
||||
import ctypes
|
||||
|
||||
# Get the minimum and maximum values that fit in signed char, short, int, long, and long long
|
||||
overchar = 2 ** 7
|
||||
while ctypes.c_byte(overchar).value > 0:
|
||||
|
|
@ -602,5 +606,6 @@ def checkType(name, maxfunc, maxval, minfunc, minval, echofunc):
|
|||
raise RuntimeError, "bad " + name + " typemap"
|
||||
|
||||
# sys.maxsize is the largest value supported by Py_ssize_t, which should be the same as ptrdiff_t
|
||||
checkType("ptrdiff_t", get_ptrdiff_max, sys.maxsize, get_ptrdiff_min, -(sys.maxsize + 1), ptrdiff_echo)
|
||||
checkType("size_t", get_size_max, (2 * sys.maxsize) + 1, get_size_min, 0, size_echo)
|
||||
if sys.version_info[0:2] >= (2, 6):
|
||||
checkType("ptrdiff_t", get_ptrdiff_max, sys.maxsize, get_ptrdiff_min, -(sys.maxsize + 1), ptrdiff_echo)
|
||||
checkType("size_t", get_size_max, (2 * sys.maxsize) + 1, get_size_min, 0, size_echo)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue