From c9ca965a0f10154dd10f4e2144d41a58c047f520 Mon Sep 17 00:00:00 2001 From: Shardul Deshpande Date: Sun, 14 Jun 2026 00:01:03 +0530 Subject: [PATCH] gh-151443: Fix documented default of `unittest.mock.mock_open`'s `read_data` parameter (GH-151444) (cherry picked from commit 9ad6ba0324a71ae5b51ded6e59b1ea3b653814a5) Co-authored-by: Shardul Deshpande --- Doc/library/unittest.mock.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index 3cd731899fead2..048dee3c84e277 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -2540,7 +2540,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.