]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-151443: Fix documented default of `unittest.mock.mock_open`'s `read_data...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 13 Jun 2026 18:37:47 +0000 (20:37 +0200)
committerGitHub <noreply@github.com>
Sat, 13 Jun 2026 18:37:47 +0000 (18:37 +0000)
(cherry picked from commit 9ad6ba0324a71ae5b51ded6e59b1ea3b653814a5)

Co-authored-by: Shardul Deshpande <iamsharduld@users.noreply.github.com>
Doc/library/unittest.mock.rst

index 8875ccadf6ad11a2284f3717daa4491e5ffc6d4a..faf3f6f615e70962e75c3617c417d642a8cdea9d 100644 (file)
@@ -2539,7 +2539,7 @@ Alternatively you can just use ``vars(my_mock)`` (instance members) and
 mock_open
 ~~~~~~~~~
 
-.. function:: mock_open(mock=None, read_data=None)
+.. function:: mock_open(mock=None, read_data='')
 
    A helper function to create a mock to replace the use of :func:`open`. It works
    for :func:`open` called directly or used as a context manager.