summaryrefslogtreecommitdiff
path: root/Lib/unittest/mock.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/unittest/mock.py')
-rw-r--r--Lib/unittest/mock.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py
index 7400fb7a64..123c156a96 100644
--- a/Lib/unittest/mock.py
+++ b/Lib/unittest/mock.py
@@ -2341,6 +2341,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