MCPcopy Index your code
hub / github.com/faif/python-patterns / test_frozen_pool

Method test_frozen_pool

tests/creational/test_pool.py:21–28  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

19 self.assertTrue(self.sample_queue.empty())
20
21 def test_frozen_pool(self):
22 with ObjectPool(self.sample_queue) as pool:
23 self.assertEqual(pool, "first")
24 self.assertEqual(pool, "first")
25 self.assertTrue(self.sample_queue.get() == "second")
26 self.assertFalse(self.sample_queue.empty())
27 self.assertTrue(self.sample_queue.get() == "first")
28 self.assertTrue(self.sample_queue.empty())
29
30
31class TestNaitivePool(unittest.TestCase):

Callers

nothing calls this directly

Calls 2

ObjectPoolClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected