cpython/Lib/unittest/test
vabr-g 4662fa9bfe
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.
2020-11-05 09:04:38 -08:00
..
testmock bpo-41877 Check for asert, aseert, assrt in mocks (GH-23165) 2020-11-05 09:04:38 -08:00
__init__.py
__main__.py
_test_warnings.py
dummy.py
support.py
test_assertions.py #30190: fix invalid escape sequence warnings (#1534) 2017-05-10 20:13:20 +02:00
test_async_case.py bpo-39101: Fixes BaseException hang in IsolatedAsyncioTestCase. (GH-22654) 2020-10-26 09:28:17 -07:00
test_break.py bpo-33746: Fix test_unittest.testRegisterResult() in verbose mode (GH-7799) 2018-06-20 11:29:33 +02:00
test_case.py bpo-41943: Fix bug where assertLogs doesn't correctly filter messages… (GH-22565) 2020-11-02 11:25:29 -08:00
test_discovery.py bpo-40275: Use new test.support helper submodules in tests (GH-21449) 2020-08-03 18:41:24 +02:00
test_functiontestcase.py
test_loader.py bpo-35767: Fix unittest.loader to allow partials as test_functions (#11600) 2019-01-23 21:57:25 +01:00
test_program.py bpo-40462: fix variable and function names (GH-19832) 2020-05-01 05:49:35 -07:00
test_result.py bpo-40275: Use new test.support helper submodules in tests (GH-21449) 2020-08-03 18:41:24 +02:00
test_runner.py [3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620) 2019-06-05 18:22:31 +03:00
test_setups.py
test_skipping.py bpo-34596: Fallback to a default reason when @unittest.skip is uncalled (#9082) 2019-09-09 16:06:48 +02:00
test_suite.py