This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author andrei.avk
Recipients andrei.avk, dmcnulla
Date 2021-10-22.21:22:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634937766.25.0.510015181726.issue45305@roundup.psfhosted.org>
In-reply-to
Content
Dave: what seems to happen here is that mock correctly reporting to you that the object you passed to the mocked func is currently `{}`. What you probably expected it to be is to be equal to what it was at exact time when it was passed, i.e. before it was modified inside the method.

That's a reasonable expectation but it means it would have to be deepcopied, which could be expensive for large structures.

Do you think that noting this nuance in the docs for call_list_args would have helped you debug it in this case?
History
Date User Action Args
2021-10-22 21:22:46andrei.avksetrecipients: + andrei.avk, dmcnulla
2021-10-22 21:22:46andrei.avksetmessageid: <1634937766.25.0.510015181726.issue45305@roundup.psfhosted.org>
2021-10-22 21:22:46andrei.avklinkissue45305 messages
2021-10-22 21:22:46andrei.avkcreate