Message234623
I guess this should be expected... too much magic :P
>>> from unittest.mock import MagicMock
>>> MagicMock(**{'__hash__.return_value': "FIXME"})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/nix/store/qlvbf3n3y34idxcgwwhsi9pq26v28q99-python3-3.4.2/lib/python3.4/unittest/mock.py", line 1772, in __init__
_safe_super(MagicMixin, self).__init__(*args, **kw)
File "/nix/store/qlvbf3n3y34idxcgwwhsi9pq26v28q99-python3-3.4.2/lib/python3.4/unittest/mock.py", line 881, in __init__
_spec_state, _new_name, _new_parent, **kwargs
File "/nix/store/qlvbf3n3y34idxcgwwhsi9pq26v28q99-python3-3.4.2/lib/python3.4/unittest/mock.py", line 410, in __init__
self.configure_mock(**kwargs)
File "/nix/store/qlvbf3n3y34idxcgwwhsi9pq26v28q99-python3-3.4.2/lib/python3.4/unittest/mock.py", line 560, in configure_mock
setattr(obj, final, val)
AttributeError: 'method-wrapper' object has no attribute 'return_value'
The same happens with e.g. __str__
>>> m.configure_mock(**{'__hash__.return_value': 1})
works just fine, instead |
|
Date |
User |
Action |
Args |
2015-01-24 17:20:39 | berdario | set | recipients:
+ berdario |
2015-01-24 17:20:39 | berdario | set | messageid: <1422120039.57.0.541541438715.issue23310@psf.upfronthosting.co.za> |
2015-01-24 17:20:39 | berdario | link | issue23310 messages |
2015-01-24 17:20:39 | berdario | create | |
|