Skip to content

Commit aeb50c0

Browse files
committed
Remove the test as it's not reliable enough, and testing allocation failues seems to be rarely done
1 parent 191f46a commit aeb50c0

1 file changed

Lines changed: 1 addition & 19 deletions

File tree

Lib/test/test_interpreters/test_channels.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Raise SkipTest if subinterpreters not supported.
1010
_channels = import_helper.import_module('_interpchannels')
1111
from concurrent import interpreters
12-
from test.support import channels, nomemtest
12+
from test.support import channels
1313
from .utils import _run_output, TestBase
1414

1515

@@ -30,24 +30,6 @@ def test_highlevel_reloaded(self):
3030
# See gh-115490 (https://github.com/python/cpython/issues/115490).
3131
importlib.reload(channels)
3232

33-
@nomemtest
34-
def test_lock_allocation_failure(self):
35-
# see gh-152635 (https://github.com/python/cpython/issues/152635)
36-
# The first allocation to happen is the lock, which
37-
# historically triggered an assert if alloc failed.
38-
import _testcapi
39-
40-
cid = None
41-
try:
42-
with self.assertRaises(MemoryError):
43-
_testcapi.set_nomemory(0, 1)
44-
cid = _channels.create()
45-
finally:
46-
_testcapi.remove_mem_hooks()
47-
if cid is not None:
48-
_channels.close(cid, force=True)
49-
_channels.destroy(cid)
50-
5133

5234
class TestChannels(TestBase):
5335

0 commit comments

Comments
 (0)