]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix mock_open docstring to use readline (GH-11266)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 20 Dec 2018 16:23:57 +0000 (08:23 -0800)
committerChris Withers <chris@withers.org>
Thu, 20 Dec 2018 16:23:57 +0000 (16:23 +0000)
(cherry picked from commit 71f82a2f2085464f5ec99c16bce57bd1631733bd)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
Lib/unittest/mock.py

index 5907e5c240f5f4b7047eb4f2cca64bbea20de5a7..955af5d2b85dc04a7b989bc43265661c9b6fc467 100644 (file)
@@ -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):