cpython/Lib/unittest/test/testmock
vabr-g fdb9efce6a
bpo-41877: Check for misspelled speccing arguments (GH-23737)
patch, patch.object and create_autospec silently ignore misspelled
arguments such as autospect, auto_spec and set_spec. This can lead
to tests failing to check what they are supposed to check.

This change adds a check causing a RuntimeError if the above
functions get any of the above misspellings as arguments. It also
adds a new argument, "unsafe", which can be set to True to disable
this check.

Also add "!r" to format specifiers in added error messages.
2020-12-14 10:30:09 -08:00
..
__init__.py
__main__.py
support.py
testasync.py
testcallable.py
testhelpers.py
testmagicmethods.py
testmock.py bpo-41877: Check for misspelled speccing arguments (GH-23737) 2020-12-14 10:30:09 -08:00
testpatch.py
testsealable.py
testsentinel.py
testwith.py