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.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
index 8c12f57..a410710 100644
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -31,8 +31,8 @@ def exit_subprocess():
def ignoring_eintr(__func, *args, **kwargs):
try:
return __func(*args, **kwargs)
- except IOError as e:
- if e.errno != signal.EINTR:
+ except EnvironmentError as e:
+ if e.errno != errno.EINTR:
raise
return None
@@ -363,12 +363,15 @@ class ItimerTest(unittest.TestCase):
def test_itimer_prof(self):
self.itimer = signal.ITIMER_PROF
signal.signal(signal.SIGPROF, self.sig_prof)
- signal.setitimer(self.itimer, 0.2)
+ signal.setitimer(self.itimer, 0.2, 0.2)
for i in range(100000000):
if signal.getitimer(self.itimer) == (0.0, 0.0):
break # sig_prof handler stopped this itimer
+ # profiling itimer should be (0.0, 0.0) now
+ self.assertEquals(signal.getitimer(self.itimer), (0.0, 0.0))
+ # and the handler should have been called
self.assertEqual(self.hndl_called, True)
def test_main():