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

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]