Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add linting changes (missed in last commit)
  • Loading branch information
shaunagm committed May 20, 2024
commit 05b3d500e2f24d5229007eba92204f0a8305eed6
8 changes: 4 additions & 4 deletions Doc/library/unittest.mock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2585,12 +2585,12 @@ called incorrectly.
Before I explain how auto-speccing works, here's why it is needed.

:class:`Mock` is a very powerful and flexible object, but it suffers from a flaw which
is general to mocking. If you refactor some of your code, rename members and so on, any
tests for code that is still using the *old api* but uses mocks instead of the real
objects will still pass. This means your tests can all pass even though your code is
is general to mocking. If you refactor some of your code, rename members and so on, any
tests for code that is still using the *old api* but uses mocks instead of the real
objects will still pass. This means your tests can all pass even though your code is
broken.

.. versionchanged:: 3.5
.. versionchanged:: 3.5

Before 3.5, tests with a typo in the word assert would silently pass when they should
raise an error. You can still achieve this behavior by passing ``unsafe=True`` to Mock.
Expand Down