diff --git a/Lib/test/test_termios.py b/Lib/test/test_termios.py index ce8392a6ccdbd6..64ad6f1c13d504 100644 --- a/Lib/test/test_termios.py +++ b/Lib/test/test_termios.py @@ -180,6 +180,9 @@ def test_tcflow(self): termios.tcflow(self.fd, termios.TCOON) termios.tcflow(self.fd, termios.TCIOFF) termios.tcflow(self.fd, termios.TCION) + # Discard the transmitted STOP and START characters, + # otherwise closing the pseudo-terminal can block. + termios.tcflush(self.fd, termios.TCOFLUSH) @support.skip_android_selinux('tcflow') def test_tcflow_errors(self):