Skip to content

Commit 544a44d

Browse files
committed
Resolved comments
1 parent bab615a commit 544a44d

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

Lib/test/test_io/test_bufferedio.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from collections import deque, UserList
1111
from itertools import cycle, count
1212
from test import support
13+
from test.support import check_sanitizer
1314
from test.support import os_helper, threading_helper
1415
from .utils import byteslike, CTestCase, PyTestCase
1516

@@ -623,16 +624,10 @@ def test_bad_readinto_type(self):
623624
bufio.readline()
624625
self.assertIsInstance(cm.exception.__cause__, TypeError)
625626

627+
@unittest.skipUnless(sys.maxsize > 2**32, 'requires 64bit platform')
628+
@unittest.skipIf(check_sanitizer(thread=True),
629+
'ThreadSanitizer aborts on huge allocations (exit code 66).')
626630
def test_read1_error_does_not_cause_reentrant_failure(self):
627-
# 32-bit builds (e.g. win32) can raise OverflowError
628-
# converting huge Python int to Py_ssize_t.
629-
if sys.maxsize <= 2**32:
630-
self.skipTest("requires 64-bit build")
631-
# Under TSan, the process may abort on huge allocation
632-
# attempts (exit code 66).
633-
if support.check_sanitizer(thread=True):
634-
self.skipTest("TSan aborts on huge allocations")
635-
636631
self.addCleanup(os_helper.unlink, os_helper.TESTFN)
637632
with self.open(os_helper.TESTFN, "wb") as f:
638633
f.write(b"hello")

0 commit comments

Comments
 (0)