summaryrefslogtreecommitdiff
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorvabr-g <vabr@google.com>2020-11-05 18:04:38 +0100
committerGitHub <noreply@github.com>2020-11-05 09:04:38 -0800
commit4662fa9bfe4a849fe87bfb321d8ef0956c89a772 (patch)
tree82067c4fbc0e0d76413b2fc8de1f73c777c82efa /Python/sysmodule.c
parent133aa2d5816b69d8ee755e1a9d2d1977b9205736 (diff)
downloadcpython-git-4662fa9bfe4a849fe87bfb321d8ef0956c89a772.tar.gz
bpo-41877 Check for asert, aseert, assrt in mocks (GH-23165)
Currently, a Mock object which is not unsafe will raise an AttributeError if an attribute with the prefix assert or assret is accessed on it. This protects against misspellings of real assert method calls, which lead to tests passing silently even if the tested code does not satisfy the intended assertion. Recently a check was done in a large code base (Google) and three more frequent ways of misspelling assert were found causing harm: asert, aseert, assrt. These are now added to the existing check.
Diffstat (limited to 'Python/sysmodule.c')
0 files changed, 0 insertions, 0 deletions