try:
    import queue
except ImportError:
    import Queue as queue

import pylibmc
from nose.tools import eq_, ok_
from tests import PylibmcTestCase

class PoolTestCase(PylibmcTestCase):
    pass

class ClientPoolTests(PoolTestCase):
    def test_simple(self):
        a_str = "a"
        p = pylibmc.ClientPool(self.mc, 2)
        with p.reserve() as smc:
            ok_(smc)
            ok_(smc.set(a_str, 1))
            eq_(smc[a_str], 1)

    def test_exhaust(self):
        p = pylibmc.ClientPool(self.mc, 2)
        with p.reserve() as smc1:
            with p.reserve() as smc2:
                self.assertRaises(queue.Empty, p.reserve().__enter__)

# TODO Thread-mapped pool tests

@@ -657,36 +657,260 @@
 _)%0A%0A
-# TODO
+class
  Thread
--m
+M
 apped
- pool tests
+PoolTests(PoolTestCase):%0A    def test_simple(self):%0A        a_str = %22a%22%0A        p = pylibmc.ThreadMappedPool(self.mc)%0A        with p.reserve() as smc:%0A            ok_(smc)%0A            ok_(smc.set(a_str, 1))%0A            eq_(smc%5Ba_str%5D, 1)
 %0A

Add rudimentary testing for thread-mapped pools