]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.9] bpo-42532: Check if NonCallableMock's spec_arg is not None instead of call...
authorKarthikeyan Singaravelan <tir.karthi@gmail.com>
Mon, 14 Dec 2020 05:49:16 +0000 (11:19 +0530)
committerGitHub <noreply@github.com>
Mon, 14 Dec 2020 05:49:16 +0000 (11:19 +0530)
commit14f2a124e20081b8981c8d6165dbd78d11b6808c
tree9bb94c70f11b778aacb1d8ba2a7791918ffc1d6c
parent3dcdbdeb4833e45430ccc9cb3432f779a6fd8c94
[3.9] bpo-42532: Check if NonCallableMock's spec_arg is not None instead of call its __bool__ function (GH-23613) (GH-23676)

Check if NonCallableMock's spec_arg is not None instead of call its __bool__ function
(cherry picked from commit c598a04dd29b89ad072245ddaf738badcfb41ac7)

Co-authored-by: idanw206 <31290383+idanw206@users.noreply.github.com>
Lib/unittest/mock.py
Lib/unittest/test/testmock/testmock.py
Misc/NEWS.d/next/Library/2020-12-02-07-37-59.bpo-42532.ObNep_.rst [new file with mode: 0644]