Test fails on Python 3, instead of spinning until timeout.

This commit is contained in:
Itamar Turner-Trauring
2021-05-07 10:06:12 -04:00
parent 036a864dc9
commit 0d093c45df
3 changed files with 4 additions and 2 deletions

View File

@ -116,6 +116,7 @@ class _MagicTextProtocol(ProcessProtocol):
self.exited.callback(None)
def outReceived(self, data):
data = unicode(data, sys.stdout.encoding)
sys.stdout.write(data)
self._output.write(data)
if not self.magic_seen.called and self._magic_text in self._output.getvalue():
@ -123,6 +124,7 @@ class _MagicTextProtocol(ProcessProtocol):
self.magic_seen.callback(self)
def errReceived(self, data):
data = unicode(data, sys.stderr.encoding)
sys.stdout.write(data)