[issue38346] Wrong behavior when using `assert_called_with` with mutable object

2019-10-03 Thread Jim Jeon
Jim Jeon added the comment: Thank you all for the kind answers. I didn't know copying could cause so many problems. @veky Thank you for the example. But it seems that the example will actually raise and I think it should. I am talking f.assert_called_with(b) when `b` has same values

[issue38346] Wrong behavior when using `assert_called_with` with mutable object

2019-10-02 Thread Jim Jeon
New submission from Jim Jeon : When `assert_called_with` is used with mutable object, test fails if the object has changed. I think this is not what it meant to do. https://docs.python.org/dev/library/unittest.mock-examples.html#coping-with-mutable-arguments The same situation is explained