# HG changeset patch # User Manuel Jacob # Date 1594118129 -7200 # Node ID 9172fd511999cef8afe8db32279227e909c2f625 # Parent 8cd18aba5e6cc3dc8b02abf54a58b7a0c13266db tests: terminate subprocess in test-stdio.py in case of exception If an error happened while reading the output of the subprocess, the pipe / TTY buffer can fill up and prevent that the subprocess ends. Therefore we should terminate the subprocess in case of an exception. diff -r 8cd18aba5e6c -r 9172fd511999 tests/test-stdio.py --- a/tests/test-stdio.py Tue Jul 07 11:06:37 2020 +0200 +++ b/tests/test-stdio.py Tue Jul 07 12:35:29 2020 +0200 @@ -99,6 +99,9 @@ self.assertEqual( _readall(stream_receiver, 1024), expected_output ) + except: # re-raises + proc.terminate() + raise finally: retcode = proc.wait() self.assertEqual(retcode, 0)