Michael Foord added the comment:

This is a deliberate design decision of mock. Storing references works better 
for the more general case, with the trade-off being that it doesn't work so 
well for mutable arguments.

See the note in the docs with a workaround:

https://docs.python.org/3/library/unittest.mock-examples.html#coping-with-mutable-arguments

----------
resolution:  -> not a bug
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28318>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to