Message187692
>>> 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 |
|
Date |
User |
Action |
Args |
2013-04-24 10:00:08 | michael.foord | set | recipients:
+ michael.foord |
2013-04-24 10:00:08 | michael.foord | set | messageid: <1366797608.02.0.0150366437779.issue17826@psf.upfronthosting.co.za> |
2013-04-24 10:00:07 | michael.foord | link | issue17826 messages |
2013-04-24 10:00:07 | michael.foord | create | |
|