[Python-checkins] cpython: Issue #8407: skip sigwait() tests if pthread_sigmask() is missing

victor.stinner python-checkins at python.org
Fri Jun 10 14:02:39 CEST 2011


http://hg.python.org/cpython/rev/60b1ab4d0cd4
changeset:   70756:60b1ab4d0cd4
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Fri Jun 10 14:02:10 2011 +0200
summary:
  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.

files:
  Lib/test/test_signal.py |  2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -598,6 +598,8 @@
         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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list