This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Typo in unittest.mock > Autospeccing documentation
Type: enhancement Stage: resolved
Components: Documentation Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Joni Bekenstein, berker.peksag, docs@python
Priority: normal Keywords:

Created on 2016-05-04 13:45 by Joni Bekenstein, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg264815 - (view) Author: Joni Bekenstein (Joni Bekenstein) Date: 2016-05-04 13:45
In several code examples from unittest.mock > Autospeccing documentation you will find "assret_called_with" instead of "assert_called_with".
msg264817 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-05-04 13:51
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.
msg264818 - (view) Author: Joni Bekenstein (Joni Bekenstein) Date: 2016-05-04 13:55
My bad, didn't see the notice! Makes sense though. Sorry for opening an issue.
History
Date User Action Args
2022-04-11 14:58:30adminsetgithub: 71137
2016-05-04 13:55:41Joni Bekensteinsetmessages: + msg264818
2016-05-04 13:51:54berker.peksagsetstatus: open -> closed

nosy: + berker.peksag
messages: + msg264817

resolution: not a bug
stage: resolved
2016-05-04 13:45:42Joni Bekensteincreate