File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 44
44
except ImportError :
45
45
_winapi = None
46
46
try :
47
- from _testcapi import INT_MAX
47
+ from _testcapi import INT_MAX , PY_SSIZE_T_MAX
48
48
except ImportError :
49
- INT_MAX = 2 ** 31 - 1
49
+ INT_MAX = PY_SSIZE_T_MAX = sys . maxsize
50
50
51
51
from test .script_helper import assert_python_ok
52
52
@@ -124,6 +124,10 @@ def test_read(self):
124
124
self .assertEqual (s , b"spam" )
125
125
126
126
@support .cpython_only
127
+ # Skip the test on 32-bit platforms: the number of bytes must fit in a
128
+ # Py_ssize_t type
129
+ @unittest .skipUnless (INT_MAX < PY_SSIZE_T_MAX ,
130
+ "needs INT_MAX < PY_SSIZE_T_MAX" )
127
131
@support .bigmemtest (size = INT_MAX + 10 , memuse = 1 , dry_run = False )
128
132
def test_large_read (self , size ):
129
133
with open (support .TESTFN , "wb" ) as fp :
You can’t perform that action at this time.
0 commit comments