]> granicus.if.org Git - python/commitdiff
Issue #8407: skip sigwait() tests if pthread_sigmask() is missing
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 10 Jun 2011 12:02:10 +0000 (14:02 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 10 Jun 2011 12:02:10 +0000 (14:02 +0200)
The new tests now requires pthread_sigmask(). Skip the test if the function is
missing, e.g. if Python is compiled without threads.

Lib/test/test_signal.py

index 7a170432f28e5e9c6630271fdc0a758cb709b139..35887efe328f53a8d27ba85c6de473640bc519e5 100644 (file)
@@ -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