From 7622eba75789badaefed0cbd445883b7a3d7eea2 Mon Sep 17 00:00:00 2001 From: Stefan Krah Date: Sat, 15 May 2010 09:31:08 +0000 Subject: [PATCH] If the timeout is exceeded, count the tests as skipped instead of just issuing a warning. --- Lib/test/test_signal.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 94ee4d129c3..228a776de5d 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -431,9 +431,8 @@ class ItimerTest(unittest.TestCase): if signal.getitimer(self.itimer) == (0.0, 0.0): break # sig_vtalrm handler stopped this itimer else: # Issue 8424 - sys.stdout.write("test_itimer_virtual: timeout: likely cause: " - "machine too slow or load too high.\n") - return + raise unittest.SkipTest("timeout: likely cause: machine too slow " + "or load too high") # virtual itimer should be (0.0, 0.0) now 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): break # sig_prof handler stopped this itimer else: # Issue 8424 - sys.stdout.write("test_itimer_prof: timeout: likely cause: " - "machine too slow or load too high.\n") - return + raise unittest.SkipTest("timeout: likely cause: machine too slow " + "or load too high") # profiling itimer should be (0.0, 0.0) now self.assertEquals(signal.getitimer(self.itimer), (0.0, 0.0))