Skip to content

Commit c8a843c

Browse files
[3.14] gh-151443: Fix documented default of unittest.mock.mock_open's read_data parameter (GH-151444) (#151451)
(cherry picked from commit 9ad6ba0) Co-authored-by: Shardul Deshpande <iamsharduld@users.noreply.github.com>
1 parent 2149a97 commit c8a843c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/library/unittest.mock.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2540,7 +2540,7 @@ Alternatively you can just use ``vars(my_mock)`` (instance members) and
25402540
mock_open
25412541
~~~~~~~~~
25422542

2543-
.. function:: mock_open(mock=None, read_data=None)
2543+
.. function:: mock_open(mock=None, read_data='')
25442544

25452545
A helper function to create a mock to replace the use of :func:`open`. It works
25462546
for :func:`open` called directly or used as a context manager.

0 commit comments

Comments
 (0)