1. Denis Bilenko
  2. gevent

Commits

Denis Bilenko  committed 53f23d0

test__threadpool.py: use built-in sleep() instead of gevent.sleep() in the pool, because otherwise a new Hub is created and screws up reference count checks

  • Participants
  • Parent commits d5e4552
  • Branches default

Comments (0)

Files changed (1)

File greentest/test__threadpool.py

View file
     def test(self):
         self.pool = pool = ThreadPool(1)
         self.assertEqual(len(pool), 0)
-        pool.spawn(gevent.sleep, 0.1)
+        pool.spawn(sleep, 0.1)
         self.assertEqual(len(pool), 1)
-        pool.spawn(gevent.sleep, 0.1)
+        pool.spawn(sleep, 0.1)
         # even though the pool is of size 1, it can contain 2 items
         # since we allow +1 for better throughput
         self.assertEqual(len(pool), 2)