]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-43478: Restrict use of Mock objects as specs (GH-25326)
authorMatthew Suozzo <msuozzo@google.com>
Sat, 10 Apr 2021 03:45:50 +0000 (23:45 -0400)
committerGitHub <noreply@github.com>
Sat, 10 Apr 2021 03:45:50 +0000 (20:45 -0700)
commitdccdc500f9b5dab0a20407ae0178d393796a8828
treea48fd0cbd5857345cd084e47f93675e56a857323
parentba1db571987c65672d9c06789e9852313ed2412a
bpo-43478: Restrict use of Mock objects as specs (GH-25326)

* Restrict using Mock objects as specs as this is always a test bug where the resulting mock is misleadingly useless.
* Skip a broken test that exposes a bug elsewhere in mock (noted in the original issue).
Lib/unittest/mock.py
Lib/unittest/test/testmock/testasync.py
Lib/unittest/test/testmock/testmock.py
Misc/NEWS.d/next/Library/2021-04-10-03-30-36.bpo-43478.iZcBTq.rst [new file with mode: 0644]