Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a flush() on the underlying binary stream.

Patch by akira.
This commit is contained in:
Antoine Pitrou 2014-05-09 00:24:50 +02:00
parent a83ade1d60
commit c644e7c39f
5 changed files with 45 additions and 4 deletions

View file

@ -786,6 +786,7 @@ class ProcessTestCase(BaseTestCase):
stdout=subprocess.PIPE,
universal_newlines=1)
p.stdin.write("line1\n")
p.stdin.flush()
self.assertEqual(p.stdout.readline(), "line1\n")
p.stdin.write("line3\n")
p.stdin.close()