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

Method test_items_recoil

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

Source from the content-addressed store, hash-verified

11 self.sample_queue.put("second")
12
13 def test_items_recoil(self):
14 with ObjectPool(self.sample_queue, True) as pool:
15 self.assertEqual(pool, "first")
16 self.assertTrue(self.sample_queue.get() == "second")
17 self.assertFalse(self.sample_queue.empty())
18 self.assertTrue(self.sample_queue.get() == "first")
19 self.assertTrue(self.sample_queue.empty())
20
21 def test_frozen_pool(self):
22 with ObjectPool(self.sample_queue) as pool:

Callers

nothing calls this directly

Calls 2

ObjectPoolClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected