aboutsummaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorvabr-g <vabr@google.com>2020-12-14 19:30:09 +0100
committerGitHub <noreply@github.com>2020-12-14 10:30:09 -0800
commitfdb9efce6ac211f973088eef508740c3fa2bd182 (patch)
tree9a109d25ccc8f22ed03710e3390fffc0b586674b /Python
parentbpo-36541: Add lib2to3 grammar PEP-570 pos-only arg parsing (GH-23759) (diff)
downloadcpython-fdb9efce6ac211f973088eef508740c3fa2bd182.tar.gz
cpython-fdb9efce6ac211f973088eef508740c3fa2bd182.tar.bz2
cpython-fdb9efce6ac211f973088eef508740c3fa2bd182.zip
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.
Diffstat (limited to 'Python')
0 files changed, 0 insertions, 0 deletions