]> granicus.if.org Git - python/commitdiff
Issue #7042: Fix test_signal failure on OS X 10.6 64-bit builds
authorMark Dickinson <dickinsm@gmail.com>
Sun, 4 Oct 2009 18:38:39 +0000 (18:38 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sun, 4 Oct 2009 18:38:39 +0000 (18:38 +0000)
(and also, with luck, on the x86 FreeBSD buildbot), by making sure
that some user time is used in test_itimer_virtual.

Lib/test/test_signal.py
Misc/NEWS

index 43683756d3685bfedf5aa7ef428997a39e5d6585..df0828dc737739aae8776aef7c9a1508b81517fb 100644 (file)
@@ -361,6 +361,8 @@ class ItimerTest(unittest.TestCase):
         signal.setitimer(self.itimer, 0.3, 0.2)
 
         for i in xrange(100000000):
+            # use up some virtual time by doing real work
+            _ = pow(12345, 67890, 10000019)
             if signal.getitimer(self.itimer) == (0.0, 0.0):
                 break # sig_vtalrm handler stopped this itimer
 
index bafb0ab5d1563c5161cce22c3dad0014be129fab..2e052fa34fab99c857be4c6bf265e984c41f8cad 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1436,6 +1436,8 @@ Extension Modules
 Tests
 -----
 
+- Issue #7042: Fix test_signal (test_itimer_virtual) failure on OS X 10.6.
+
 - Issue #6806: test_platform failed under OS X 10.6.0 because ``sw_ver`` leaves
   off the trailing 0 in the version number.