mirror of https://github.com/python/cpython
If the timeout is exceeded, count the tests as skipped instead of just
issuing a warning.
This commit is contained in:
parent
2b271f7e30
commit
7622eba757
|
@ -431,9 +431,8 @@ class ItimerTest(unittest.TestCase):
|
||||||
if signal.getitimer(self.itimer) == (0.0, 0.0):
|
if signal.getitimer(self.itimer) == (0.0, 0.0):
|
||||||
break # sig_vtalrm handler stopped this itimer
|
break # sig_vtalrm handler stopped this itimer
|
||||||
else: # Issue 8424
|
else: # Issue 8424
|
||||||
sys.stdout.write("test_itimer_virtual: timeout: likely cause: "
|
raise unittest.SkipTest("timeout: likely cause: machine too slow "
|
||||||
"machine too slow or load too high.\n")
|
"or load too high")
|
||||||
return
|
|
||||||
|
|
||||||
# virtual itimer should be (0.0, 0.0) now
|
# virtual itimer should be (0.0, 0.0) now
|
||||||
self.assertEquals(signal.getitimer(self.itimer), (0.0, 0.0))
|
self.assertEquals(signal.getitimer(self.itimer), (0.0, 0.0))
|
||||||
|
@ -455,9 +454,8 @@ class ItimerTest(unittest.TestCase):
|
||||||
if signal.getitimer(self.itimer) == (0.0, 0.0):
|
if signal.getitimer(self.itimer) == (0.0, 0.0):
|
||||||
break # sig_prof handler stopped this itimer
|
break # sig_prof handler stopped this itimer
|
||||||
else: # Issue 8424
|
else: # Issue 8424
|
||||||
sys.stdout.write("test_itimer_prof: timeout: likely cause: "
|
raise unittest.SkipTest("timeout: likely cause: machine too slow "
|
||||||
"machine too slow or load too high.\n")
|
"or load too high")
|
||||||
return
|
|
||||||
|
|
||||||
# profiling itimer should be (0.0, 0.0) now
|
# profiling itimer should be (0.0, 0.0) now
|
||||||
self.assertEquals(signal.getitimer(self.itimer), (0.0, 0.0))
|
self.assertEquals(signal.getitimer(self.itimer), (0.0, 0.0))
|
||||||
|
|
Loading…
Reference in New Issue