summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_signal.py
diff options
context:
space:
mode:
authorCharles-François Natali <cf.natali@gmail.com>2015-02-07 13:27:50 (GMT)
committerCharles-François Natali <cf.natali@gmail.com>2015-02-07 13:27:50 (GMT)
commit6e6c59b5085668f6047eb91bd671747b13fa36d1 (patch)
tree8f1c506e399e201d40f8009a081039a071f875aa /Lib/test/test_signal.py
parentd005090e01b46f00494f9f268b4c8dc2b28ffe2c (diff)
downloadcpython-6e6c59b5085668f6047eb91bd671747b13fa36d1.zip
cpython-6e6c59b5085668f6047eb91bd671747b13fa36d1.tar.gz
cpython-6e6c59b5085668f6047eb91bd671747b13fa36d1.tar.bz2
Issue #23285: PEP 475 -- Retry system calls failing with EINTR.
Diffstat (limited to 'Lib/test/test_signal.py')
-rw-r--r--Lib/test/test_signal.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
index 8f3dde4..774fc80 100644
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -587,7 +587,7 @@ class SiginterruptTest(unittest.TestCase):
r, w = os.pipe()
def handler(signum, frame):
- pass
+ 1 / 0
signal.signal(signal.SIGALRM, handler)
if interrupt is not None:
@@ -604,9 +604,8 @@ class SiginterruptTest(unittest.TestCase):
try:
# blocking call: read from a pipe without data
os.read(r, 1)
- except OSError as err:
- if err.errno != errno.EINTR:
- raise
+ except ZeroDivisionError:
+ pass
else:
sys.exit(2)
sys.exit(3)