mirror of
https://github.com/python/cpython.git
synced 2025-09-19 15:10:58 +00:00
Issue #21932: Skip test_os.test_large_read() on 32-bit system
This commit is contained in:
parent
e8567106c0
commit
5c6e6fc57e
1 changed files with 6 additions and 2 deletions
|
@ -44,9 +44,9 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
_winapi = None
|
_winapi = None
|
||||||
try:
|
try:
|
||||||
from _testcapi import INT_MAX
|
from _testcapi import INT_MAX, PY_SSIZE_T_MAX
|
||||||
except ImportError:
|
except ImportError:
|
||||||
INT_MAX = 2 ** 31 - 1
|
INT_MAX = PY_SSIZE_T_MAX = sys.maxsize
|
||||||
|
|
||||||
from test.script_helper import assert_python_ok
|
from test.script_helper import assert_python_ok
|
||||||
|
|
||||||
|
@ -124,6 +124,10 @@ class FileTests(unittest.TestCase):
|
||||||
self.assertEqual(s, b"spam")
|
self.assertEqual(s, b"spam")
|
||||||
|
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
|
# Skip the test on 32-bit platforms: the number of bytes must fit in a
|
||||||
|
# Py_ssize_t type
|
||||||
|
@unittest.skipUnless(INT_MAX < PY_SSIZE_T_MAX,
|
||||||
|
"needs INT_MAX < PY_SSIZE_T_MAX")
|
||||||
@support.bigmemtest(size=INT_MAX + 10, memuse=1, dry_run=False)
|
@support.bigmemtest(size=INT_MAX + 10, memuse=1, dry_run=False)
|
||||||
def test_large_read(self, size):
|
def test_large_read(self, size):
|
||||||
with open(support.TESTFN, "wb") as fp:
|
with open(support.TESTFN, "wb") as fp:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue