Skip to content

Commit cb944d0

Browse files
authored
Add import of unittest.mock.Mock in documentation (#102346)
1 parent 7b91320 commit cb944d0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Doc/library/unittest.mock.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ available, and then make assertions about how they have been used:
7272
:attr:`side_effect` allows you to perform side effects, including raising an
7373
exception when a mock is called:
7474

75+
>>> from unittest.mock import Mock
7576
>>> mock = Mock(side_effect=KeyError('foo'))
7677
>>> mock()
7778
Traceback (most recent call last):

0 commit comments

Comments
 (0)