diff options
Diffstat (limited to 'Lib/unittest/mock.py')
-rw-r--r-- | Lib/unittest/mock.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index cabae15214..86a5a3dfeb 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -2323,6 +2323,8 @@ def mock_open(mock=None, read_data=''): yield handle.readline.return_value for line in _state[0]: yield line + while True: + yield type(read_data)() global file_spec |