diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-20 12:42:52 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-20 12:42:52 (GMT) |
commit | 03129230c925d862599025d70d088c967593c1f3 (patch) | |
tree | 765cff1f574c031b74afa9443c321e762b100264 /Lib/test/eintrdata | |
parent | 1335ca5053daa07abf50b3d227ba346155360e76 (diff) | |
download | cpython-03129230c925d862599025d70d088c967593c1f3.zip cpython-03129230c925d862599025d70d088c967593c1f3.tar.gz cpython-03129230c925d862599025d70d088c967593c1f3.tar.bz2 |
Issue #23715: Fix test_eintr, skip tests on signal.sigwaitinfo() and
signal.sigtimedwait() if functions are missing
Diffstat (limited to 'Lib/test/eintrdata')
-rw-r--r-- | Lib/test/eintrdata/eintr_tester.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/eintrdata/eintr_tester.py b/Lib/test/eintrdata/eintr_tester.py index 2d2876e..c522771 100644 --- a/Lib/test/eintrdata/eintr_tester.py +++ b/Lib/test/eintrdata/eintr_tester.py @@ -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() |