[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

Andrew Dunai report at bugs.python.org
Mon Dec 3 14:00:29 EST 2018


Andrew Dunai <a at dun.ai> added the comment:

I was considering wrapping a `unittest.mock._Call` class definition within a function that would contain name & parent as local variables (arguments). Thus they would be accessible within the `_Call` class, but wouldn't be accessible from the outside. However this would make them inaccessible from other instances of `_Call`. So I think I'll stick to the more trivial solution of renaming them to `_mock_name` and `_mock_parent` to conform to the rest of the module :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35357>
_______________________________________


More information about the Python-bugs-list mailing list