From: Victor Stinner Date: Fri, 10 Jun 2011 12:02:10 +0000 (+0200) Subject: Issue #8407: skip sigwait() tests if pthread_sigmask() is missing X-Git-Tag: v3.3.0a1~2138 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f294d1e19a4f20f03e972d47c54cd6d19c42983;p=python 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. --- diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 7a170432f2..35887efe32 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -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