From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 20 Dec 2018 16:23:57 +0000 (-0800) Subject: Fix mock_open docstring to use readline (GH-11266) X-Git-Tag: v3.7.3rc1~225 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5fe170d9c1355aa5c34e7c0d2591dc3ff29c6f29;p=thirdparty%2FPython%2Fcpython.git Fix mock_open docstring to use readline (GH-11266) (cherry picked from commit 71f82a2f2085464f5ec99c16bce57bd1631733bd) Co-authored-by: Xtreak --- diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index 5907e5c240f5..955af5d2b85d 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -2352,7 +2352,7 @@ def mock_open(mock=None, read_data=''): default) then a `MagicMock` will be created for you, with the API limited to methods or attributes available on standard file handles. - `read_data` is a string for the `read` methoddline`, and `readlines` of the + `read_data` is a string for the `read`, `readline` and `readlines` of the file handle to return. This is an empty string by default. """ def _readlines_side_effect(*args, **kwargs):