Message378568
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 |
|
Date |
User |
Action |
Args |
2020-10-13 16:54:46 | vabr2 | set | recipients:
+ vabr2, rbcollins, carljm, michael.foord, poke, bignose, erik.bray, berker.peksag, kushal.das, ztane, fov, kevinbenton |
2020-10-13 16:54:46 | vabr2 | set | messageid: <1602608086.44.0.926301448212.issue24651@roundup.psfhosted.org> |
2020-10-13 16:54:46 | vabr2 | link | issue24651 messages |
2020-10-13 16:54:46 | vabr2 | create | |
|