This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author michael.foord
Recipients michael.foord
Date 2013-04-24.10:00:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1366797608.02.0.0150366437779.issue17826@psf.upfronthosting.co.za>
In-reply-to
Content
>>> from unittest.mock import create_autospec
>>> def f(): pass
... 
>>> m = create_autospec(f)
>>> m.side_effect = [1, 2]
>>> m()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 3, in f
  File "/compile/py3k-cpython/Lib/unittest/mock.py", line 872, in __call__
    return _mock_self._mock_call(*args, **kwargs)
  File "/compile/py3k-cpython/Lib/unittest/mock.py", line 931, in _mock_call
    result = next(effect)
TypeError: 'list' object is not an iterator
History
Date User Action Args
2013-04-24 10:00:08michael.foordsetrecipients: + michael.foord
2013-04-24 10:00:08michael.foordsetmessageid: <1366797608.02.0.0150366437779.issue17826@psf.upfronthosting.co.za>
2013-04-24 10:00:07michael.foordlinkissue17826 messages
2013-04-24 10:00:07michael.foordcreate