mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Issue #23715: Fix test_eintr, skip tests on signal.sigwaitinfo() and
signal.sigtimedwait() if functions are missing
This commit is contained in:
parent
1335ca5053
commit
03129230c9
1 changed files with 4 additions and 0 deletions
|
|
@ -268,12 +268,16 @@ class TimeEINTRTest(EINTRBaseTest):
|
|||
class SignalEINTRTest(EINTRBaseTest):
|
||||
""" EINTR tests for the signal module. """
|
||||
|
||||
@unittest.skipUnless(hasattr(signal, 'sigtimedwait'),
|
||||
'need signal.sigtimedwait()')
|
||||
def test_sigtimedwait(self):
|
||||
t0 = time.monotonic()
|
||||
signal.sigtimedwait([], self.sleep_time)
|
||||
dt = time.monotonic() - t0
|
||||
self.assertGreaterEqual(dt, self.sleep_time)
|
||||
|
||||
@unittest.skipUnless(hasattr(signal, 'sigwaitinfo'),
|
||||
'need signal.sigwaitinfo()')
|
||||
def test_sigwaitinfo(self):
|
||||
signum = signal.SIGUSR1
|
||||
pid = os.getpid()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue