]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-38669: patch.object now raises a helpful error (GH17510)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 9 Dec 2019 06:59:04 +0000 (22:59 -0800)
committerChris Withers <chris@withers.org>
Mon, 9 Dec 2019 06:59:04 +0000 (06:59 +0000)
commit4594565b56e9c99d2d3fb7549041bbca5ecba8e2
tree806c9f49efdb9456b8dacdc8a65ccd9801e56b10
parent184a3812b81e2f7d4bc6453bf7ceabe8ac590202
bpo-38669: patch.object now raises a helpful error (GH17510)

This means a clearer message is now shown when patch.object is called with two string arguments, rather than a class and a string argument.
(cherry picked from commit cd90a52983db34896a6335a572d55bdda274778f)

Co-authored-by: Elena Oat <oat.elena@gmail.com>
Lib/unittest/mock.py
Lib/unittest/test/testmock/testpatch.py
Misc/NEWS.d/next/Tests/2019-11-04-02-54-16.bpo-38669.pazXZ8.rst [new file with mode: 0644]