mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #8407: skip sigwait() tests if pthread_sigmask() is missing
The new tests now requires pthread_sigmask(). Skip the test if the function is missing, e.g. if Python is compiled without threads.
This commit is contained in:
parent
3a38a6db43
commit
7f294d1e19
1 changed files with 2 additions and 0 deletions
|
@ -598,6 +598,8 @@ class PendingSignalsTests(unittest.TestCase):
|
|||
with self.assertRaises(ZeroDivisionError):
|
||||
signal.pthread_kill(current, signum)
|
||||
|
||||
@unittest.skipUnless(hasattr(signal, 'pthread_sigmask'),
|
||||
'need signal.pthread_sigmask()')
|
||||
def check_sigwait(self, test, signum):
|
||||
# sigwait must be called with the signal blocked: since the current
|
||||
# process might have several threads running, we fork() a child process
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue