summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_signal.py
diff options
context:
space:
mode:
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)