New submission from Diego Elio Pettenò <flamee...@flameeyes.com>: The unittest.mock `assert_called_*with*` methods take either literals, or the single `ANY` special matcher (https://docs.python.org/3/library/unittest.mock.html#any) to match any argument.
Experience suggests me that it's useful to have more flexible matchers, such as INSTANCEOF or REGEXP. Will provide a starting pull request for this today. (Be warned: it's the first time I try contributing to CPython.) ---------- components: Tests messages: 365457 nosy: Diego Elio Pettenò priority: normal severity: normal status: open title: Provide additional matchers for unittest.mock type: enhancement versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40133> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com