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)
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)