def test_setvalue_io_error(self):
        mock = MagicMock(side_effect=IOError(''))
        with patch.object(_Augeas, 'save', mock):
            self.assertEqual(augeas_cfg.setvalue('prefix=/files/etc/'),
                             {'retval': False, 'error': ''})
Test setting the limit in method call.
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/augeas_cfg_test.py/AugeasCfgTestCase.test_setvalue_io_error--crossover with--dataset/ETHPy150Open hozn/stravalib/stravalib/tests/functional/test_result_iterator.py/ResultIteratorTest.test_limit_call