예제 #1
0
 def test_shrink(self):
     x = TaskPool(10)
     x._pool = Mock(name='_pool')
     x.shrink(2)
     assert x.limit == 8
     x._pool.resize.assert_called_with(8)
예제 #2
0
 def test_shrink(self):
     x = TaskPool(10)
     x._pool = Mock(name='_pool')
     x.shrink(2)
     self.assertEqual(x.limit, 8)
     x._pool.resize.assert_called_with(8)
예제 #3
0
 def test_shrink(self):
     x = TaskPool(10)
     x._pool = Mock(name='_pool')
     x.shrink(2)
     self.assertEqual(x.limit, 8)
     x._pool.resize.assert_called_with(8)
예제 #4
0
 def test_shrink(self):
     x = TaskPool(10)
     x._pool = Mock(name='_pool')
     x.shrink(2)
     assert x.limit == 8
     x._pool.resize.assert_called_with(8)