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
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