]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add import of `unittest.mock.Mock` in documentation (#102346)
authorWagner Alberto <wagneralbjr@gmail.com>
Fri, 3 Mar 2023 17:25:31 +0000 (14:25 -0300)
committerGitHub <noreply@github.com>
Fri, 3 Mar 2023 17:25:31 +0000 (22:55 +0530)
Doc/library/unittest.mock.rst

index d6d8e5e9557d5cd0dcec972bef10bcb043d8f108..6c4d801f69f5a9da325671f2cae6d68f7ccc2e15 100644 (file)
@@ -72,6 +72,7 @@ available, and then make assertions about how they have been used:
 :attr:`side_effect` allows you to perform side effects, including raising an
 exception when a mock is called:
 
+   >>> from unittest.mock import Mock
    >>> mock = Mock(side_effect=KeyError('foo'))
    >>> mock()
    Traceback (most recent call last):