Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
Mocks can no longer be used as the specs for other Mocks. As a result, an already-mocked object cannot have an attribute mocked using `autospec=True` or be the subject of a `create_autospec(...)` call. This can uncover bugs in tests since these Mock-derived Mocks will always pass certain tests (e.g. isinstance) and builtin assert functions (e.g. assert_called_once_with) will unconditionally pass.
Mocks can no longer be used as the specs for other Mocks. As a result, an
already-mocked object cannot have an attribute mocked using ``autospec=True``
or be the subject of a ``create_autospec(...)`` call. This can uncover bugs in
tests since these Mock-derived Mocks will always pass certain tests (e.g.
:func:`isinstance`) and builtin assert functions (e.g. assert_called_once_with)
will unconditionally pass.