[New-bugs-announce] [issue47235] Clarify that `assret_called_once_with` sample code is intended typo

Mariatta report at bugs.python.org
Tue Apr 5 18:46:09 EDT 2022


New submission from Mariatta <mariatta at python.org>:

In unittest.mock documentation, there is an example code which intentionally contains typo.

Source: https://github.com/python/cpython/blame/main/Doc/library/unittest.mock.rst#L2553

We've received quite a number of false "bug report" regarding this text. Basically people saw the sample code containing `assret` then they rushed to create an issue/PR, before actually reading the rest of the section. This typo was intentionally placed there, so it should not be fixed. However since this is definitely confusing to readers, perhaps the documentation should be improved.

On Discord, Brandt suggested to add a comment on the sample code like:


```
# Intended typo!
```

so hopefully people will stop trying to fix it.


Previous false "bug reports":
bpo-35789
bpo-38700

----------
assignee: docs at python
components: Documentation
messages: 416826
nosy: Mariatta, docs at python
priority: normal
severity: normal
stage: needs patch
status: open
title: Clarify that `assret_called_once_with` sample code is intended typo
versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47235>
_______________________________________


More information about the New-bugs-announce mailing list