mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fix mock_open docstring to use readline (#11176)
This commit is contained in:
parent
292cd6e331
commit
71f82a2f20
1 changed files with 1 additions and 1 deletions
|
@ -2376,7 +2376,7 @@ def mock_open(mock=None, read_data=''):
|
||||||
default) then a `MagicMock` will be created for you, with the API limited
|
default) then a `MagicMock` will be created for you, with the API limited
|
||||||
to methods or attributes available on standard file handles.
|
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.
|
file handle to return. This is an empty string by default.
|
||||||
"""
|
"""
|
||||||
def _readlines_side_effect(*args, **kwargs):
|
def _readlines_side_effect(*args, **kwargs):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue