From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 13 Jun 2026 18:39:44 +0000 (+0200) Subject: [3.15] gh-151443: Fix documented default of `unittest.mock.mock_open`'s `read_data... X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=56ad6505e193ab98bf661daf770dea161d83965d;p=thirdparty%2FPython%2Fcpython.git [3.15] gh-151443: Fix documented default of `unittest.mock.mock_open`'s `read_data` parameter (GH-151444) (#151450) (cherry picked from commit 9ad6ba0324a71ae5b51ded6e59b1ea3b653814a5) Co-authored-by: Shardul Deshpande --- diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index 6ba1b87ea942..5e28a8ada595 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -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.