Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a6a4762

Browse files
committed
Fix resetting of FakeStream
1 parent dd182fb commit a6a4762

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def __init__(self, stream):
170170
def get_bytes(self):
171171
"""Get the output as-if no encoding occurred"""
172172
data = self._stream.data.getvalue()
173-
self._stream = io.BytesIO()
173+
self._stream.data.truncate(0)
174174
return data
175175

176176
def get(self):

0 commit comments

Comments
 (0)