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: Clarify that `assret_called_once_with` sample code is intended typo
Type: Stage: resolved
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: Mariatta, docs@python, gregory.p.smith, miss-islington
Priority: normal Keywords: patch

Created on 2022-04-05 22:46 by Mariatta, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 32348 merged gregory.p.smith, 2022-04-06 00:30
PR 32367 merged miss-islington, 2022-04-06 15:07
PR 32368 merged miss-islington, 2022-04-06 15:07
Messages (5)
msg416826 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2022-04-05 22:46
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
msg416836 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2022-04-06 00:23
LOL... we didn't anticipate this happening when adding the commonly found typo detection feature.
msg416875 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2022-04-06 15:07
New changeset ac1fb07b6ecb6b93446484f52894914e5199de63 by Gregory P. Smith in branch 'main':
bpo-47235: Note where a typo is intentional in code. (GH-32348)
https://github.com/python/cpython/commit/ac1fb07b6ecb6b93446484f52894914e5199de63
msg416877 - (view) Author: miss-islington (miss-islington) Date: 2022-04-06 15:30
New changeset 3856b4995ec0e632d47b733cdecb5183ac830568 by Miss Islington (bot) in branch '3.10':
bpo-47235: Note where a typo is intentional in code. (GH-32348)
https://github.com/python/cpython/commit/3856b4995ec0e632d47b733cdecb5183ac830568
msg416879 - (view) Author: miss-islington (miss-islington) Date: 2022-04-06 15:32
New changeset 770780e63e2a99f842670ef901a257ba64293d6b by Miss Islington (bot) in branch '3.9':
bpo-47235: Note where a typo is intentional in code. (GH-32348)
https://github.com/python/cpython/commit/770780e63e2a99f842670ef901a257ba64293d6b
History
Date User Action Args
2022-04-11 14:59:58adminsetgithub: 91391
2022-04-06 15:32:29miss-islingtonsetmessages: + msg416879
2022-04-06 15:30:12miss-islingtonsetmessages: + msg416877
2022-04-06 15:13:40gregory.p.smithsetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: - Python 3.8
2022-04-06 15:07:27miss-islingtonsetpull_requests: + pull_request30416
2022-04-06 15:07:19miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request30415
2022-04-06 15:07:14gregory.p.smithsetmessages: + msg416875
2022-04-06 00:30:42gregory.p.smithsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request30401
2022-04-06 00:23:03gregory.p.smithsetassignee: docs@python -> gregory.p.smith

messages: + msg416836
nosy: + gregory.p.smith
2022-04-05 22:46:09Mariattacreate