Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
bpo-31804: Review changes 3 - decorate StringIO with _file_like and a…
…dd close method to _file_like
  • Loading branch information
SlaushVunter committed Feb 22, 2018
commit 5e91e604062f583b1a04b8045386cdc51b43dfbb
5 changes: 4 additions & 1 deletion Lib/test/_test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ def closeIO(stream_name, evt, type_):
if type_ == 'threads':
# it is safe to close std streams in another process, but if thread
# are used, we must not close the original std streams
closed_stream = io.StringIO()
closed_stream = _file_like(io.StringIO())
closed_stream.close()
setattr(sys, stream_name, closed_stream)
else:
Expand Down Expand Up @@ -3874,6 +3874,9 @@ def flush(self):
self._delegate.write(''.join(self.cache))
self._cache = []

def close(self):
self._delegate.close()

class TestStdinBadfiledescriptor(unittest.TestCase):

def test_queue_in_process(self):
Expand Down