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 michael.foord
Recipients michael.foord, paetling, rbcollins
Date 2015-09-08.14:29:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441722561.78.0.972027427282.issue25000@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2015-09-08 14:29:21michael.foordsetrecipients: + michael.foord, rbcollins, paetling
2015-09-08 14:29:21michael.foordsetmessageid: <1441722561.78.0.972027427282.issue25000@psf.upfronthosting.co.za>
2015-09-08 14:29:21michael.foordlinkissue25000 messages
2015-09-08 14:29:21michael.foordcreate