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.

Author vabr2
Recipients berker.peksag, bignose, carljm, erik.bray, fov, kevinbenton, kushal.das, michael.foord, poke, rbcollins, vabr2, ztane
Date 2020-10-13.16:54:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1602608086.44.0.926301448212.issue24651@roundup.psfhosted.org>
In-reply-to
Content
As for the assert misspellings raising AttributeError -- that's not true of all of them, only those starting with "assret" or "assert" [1].

In my company, we recently cleaned up a bunch of other assert-misspellings, including cases where a real bug was masked in the code by that. That's why I filed https://bugs.python.org/issue41877.

IMO, the fact that the assert-misspellings issue is not completely fixed seems to increase the motivation to add a module-level assert.

While it's easy to add further misspellings to the check in [1], the general solution proposed in this ticket avoids a length whack-a-mole for code owners who would be able / willing to switch to a module-level assert.

[1] https://github.com/python/cpython/blob/master/Lib/unittest/mock.py#L634
History
Date User Action Args
2020-10-13 16:54:46vabr2setrecipients: + vabr2, rbcollins, carljm, michael.foord, poke, bignose, erik.bray, berker.peksag, kushal.das, ztane, fov, kevinbenton
2020-10-13 16:54:46vabr2setmessageid: <1602608086.44.0.926301448212.issue24651@roundup.psfhosted.org>
2020-10-13 16:54:46vabr2linkissue24651 messages
2020-10-13 16:54:46vabr2create