From 180e3ac92ae6be46aee984c77777529fb5b1d7b5 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 17 Nov 2024 04:13:45 +0000 Subject: [PATCH] Fix failing test --- src/cysignals/tests.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cysignals/tests.pyx b/src/cysignals/tests.pyx index 4bff7d5..547095f 100644 --- a/src/cysignals/tests.pyx +++ b/src/cysignals/tests.pyx @@ -1290,11 +1290,12 @@ def test_thread_sig_block(long delay=DEFAULT_DELAY): sig_off() -cdef void* func_thread_sig_block(void* ignored) noexcept nogil: +cdef void* func_thread_sig_block(void* ignored) noexcept with gil: # This is executed by the two threads spawned by test_thread_sig_block() cdef int n for n in range(1000000): sig_block() if not (1 <= cysigs.block_sigint <= 2): + PyErr_SetString(RuntimeError, "sig_block() is not thread-safe") sig_error() sig_unblock()