New submission from Jim Jeon <jimjeon...@gmail.com>:
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 in this document. But I don't understand why they did not fix and just are proposing some solutions to the users. ---------- components: Tests files: Screen Shot 2019-10-02 at 5.22.05 PM.png messages: 353727 nosy: Jim Jeon priority: normal severity: normal status: open title: Wrong behavior when using `assert_called_with` with mutable object type: enhancement versions: Python 3.7 Added file: https://bugs.python.org/file48638/Screen Shot 2019-10-02 at 5.22.05 PM.png _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38346> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com