[Twisted-Python] Re: [Twisted-commits] r15819 - Maybe make this test more robust. Windows sucks.

Jean-Paul Calderone exarkun at divmod.com
Fri Feb 3 11:55:00 EST 2006


On Fri, 03 Feb 2006 00:30:41 -0700, Jonathan Lange <jml at wolfwood.twistedmatrix.com> wrote:
>Author: jml
>Date: Fri Feb  3 00:30:40 2006
>New Revision: 15819
>
>Modified:
>   trunk/twisted/trial/test/test_reporter.py
>Log:
>Maybe make this test more robust. Windows sucks.
>
>
>
>Modified: trunk/twisted/trial/test/test_reporter.py
>==============================================================================
>--- trunk/twisted/trial/test/test_reporter.py	(original)
>+++ trunk/twisted/trial/test/test_reporter.py	Fri Feb  3 00:30:40 2006
>@@ -42,6 +42,7 @@
>     def test_timing(self):
>         the_reporter = reporter.Reporter()
>         the_reporter._somethingStarted()
>+        time.sleep(0.01)
>         the_reporter._somethingStarted()
>         time.sleep(0.01)
>         time1 = the_reporter._somethingStopped()

I think robustness is inversely correlated with number of time-related calls.

What are these sleeps for?  Maybe the reporter's timing function should be parameterized so this can be deterministic, instead of relying on a clock that is guaranteed to say something nasty from time to time?

Jean-Paul




More information about the Twisted-Python mailing list