[issue28318] Python unittest.mock.mock_calls stores references to arguments instead of their values

2016-10-03 Thread Guillaume Chorn
Guillaume Chorn added the comment: If it's true that our ability to accurately deep-copy mutable args makes fixing this behavior impossible, we should at the very least update the official unittest.mock documentation to warn users that testing for mock calls with mutable arguments i

[issue28318] Python unittest.mock.mock_calls stores references to arguments instead of their values

2016-09-30 Thread Guillaume Chorn
New submission from Guillaume Chorn: In the unittest.mock library, when a Mock object stores the calls made on it in its `mock_calls` attribute, it appears to store references to the call arguments instead of the actual values of the call arguments. In cases where call args are mutable types