mirror of https://github.com/python/cpython
4662fa9bfe
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. |
||
---|---|---|
.. | ||
testmock | ||
__init__.py | ||
__main__.py | ||
_test_warnings.py | ||
dummy.py | ||
support.py | ||
test_assertions.py | ||
test_async_case.py | ||
test_break.py | ||
test_case.py | ||
test_discovery.py | ||
test_functiontestcase.py | ||
test_loader.py | ||
test_program.py | ||
test_result.py | ||
test_runner.py | ||
test_setups.py | ||
test_skipping.py | ||
test_suite.py |