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 Guillaume Chorn, michael.foord, r.david.murray, rbcollins, veky
Date 2016-10-04.10:07:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1475575620.27.0.300023780402.issue28318@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2016-10-04 10:07:00michael.foordsetrecipients: + michael.foord, rbcollins, r.david.murray, veky, Guillaume Chorn
2016-10-04 10:07:00michael.foordsetmessageid: <1475575620.27.0.300023780402.issue28318@psf.upfronthosting.co.za>
2016-10-04 10:07:00michael.foordlinkissue28318 messages
2016-10-04 10:07:00michael.foordcreate