[Python-checkins] r60534 - python/trunk/Lib/test/test_queue.py

Brett Cannon brett at python.org
Sun Feb 3 03:43:32 CET 2008


That damn sqlite issue I had held me up between svn updates and so I
fixed this after you did. Blah.

-Brett

On Feb 2, 2008 3:59 PM, georg.brandl <python-checkins at python.org> wrote:
> Author: georg.brandl
> Date: Sun Feb  3 00:59:21 2008
> New Revision: 60534
>
> Modified:
>    python/trunk/Lib/test/test_queue.py
> Log:
> Fix a conversion mistake that caused test_queue to fail intermittently.
>
>
> Modified: python/trunk/Lib/test/test_queue.py
> ==============================================================================
> --- python/trunk/Lib/test/test_queue.py (original)
> +++ python/trunk/Lib/test/test_queue.py Sun Feb  3 00:59:21 2008
> @@ -138,13 +138,13 @@
>
>      def worker(self, q):
>          while True:
> -            self.x = q.get()
> -            if self.x is None:
> +            x = q.get()
> +            if x is None:
>                  q.task_done()
>                  return
>              self.cumlock.acquire()
>              try:
> -                self.cum += self.x
> +                self.cum += x
>              finally:
>                  self.cumlock.release()
>              q.task_done()
> @@ -157,7 +157,7 @@
>              q.put(i)
>          q.join()
>          self.assertEquals(self.cum, sum(range(100)),
> -                        "q.join() did not block until all tasks were done")
> +                          "q.join() did not block until all tasks were done")
>          for i in (0,1):
>              q.put(None)         # instruct the threads to close
>          q.join()                # verify that you can join twice
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-checkins
>


More information about the Python-checkins mailing list