We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55ffc32 commit 571e16fCopy full SHA for 571e16f
Lib/test/test_capi/test_mem.py
@@ -68,8 +68,13 @@ def test_api_misuse(self):
68
69
def check_malloc_without_gil(self, code):
70
out = self.check(code)
71
- expected = ('Fatal Python error: _PyMem_DebugMalloc: '
72
- 'Python memory allocator called without holding the GIL')
+ if not support.Py_GIL_DISABLED:
+ expected = ('Fatal Python error: _PyMem_DebugMalloc: '
73
+ 'Python memory allocator called without holding the GIL')
74
+ else:
75
76
+ 'Python memory allocator called without an active thread state. '
77
+ '(Are you trying to call it inside of a Py_BEGIN_ALLOW_THREADS block?)')
78
self.assertIn(expected, out)
79
80
def test_pymem_malloc_without_gil(self):
0 commit comments