Michael Foord added the comment: This is actually the specified and documented behaviour of mock when it is passed mutable arguments. Deep copying arguments on calls is rife with potential problems (not everything can be copied and it breaks comparison by identity). The documentation suggests ways around this:
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/issue25000> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com