[issue26950] Typo in unittest.mock > Autospeccing documentation
New submission from Joni Bekenstein: In several code examples from unittest.mock > Autospeccing documentation you will find "assret_called_with" instead of "assert_called_with". ---------- assignee: docs@python components: Documentation messages: 264815 nosy: Joni Bekenstein, docs@python priority: normal severity: normal status: open title: Typo in unittest.mock > Autospeccing documentation type: enhancement _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue26950> _______________________________________
Berker Peksag added the comment: Thanks for the report, but the typos are intentional. Quoting from the documentation: [...] if you misspell one of these assert methods then your assertion is gone: >>> mock = Mock(name='Thing', return_value=None) >>> mock(1, 2, 3) >>> mock.assret_called_once_with(4, 5, 6) Your tests can pass silently and incorrectly because of the typo. ---------- nosy: +berker.peksag resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue26950> _______________________________________
Joni Bekenstein added the comment: My bad, didn't see the notice! Makes sense though. Sorry for opening an issue. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue26950> _______________________________________
participants (2)
-
Berker Peksag -
Joni Bekenstein