Skip to content

Commit 8d15fea

Browse files
Skip failing test_tcsendbreak on FreeBSD
1 parent 55d3735 commit 8d15fea

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Lib/test/test_termios.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import errno
2-
import io
32
import os
3+
import sys
44
import tempfile
55
import unittest
66
from test.support.import_helper import import_module
@@ -91,7 +91,13 @@ def test_tcsetattr_errors(self):
9191
self.assertRaises(TypeError, termios.tcsetattr, self.fd, termios.TCSANOW)
9292

9393
def test_tcsendbreak(self):
94-
termios.tcsendbreak(self.fd, 1)
94+
try:
95+
termios.tcsendbreak(self.fd, 1)
96+
except termios.error as exc:
97+
if exc.args[0] == errno.ENOTTY and sys.platform.startswith('freebsd'):
98+
self.skipTest('termios.tcsendbreak() is not supported '
99+
'with pseudo-terminals (?) on this platform')
100+
raise
95101
termios.tcsendbreak(self.stream, 1)
96102

97103
def test_tcsendbreak_errors(self):

0 commit comments

Comments
 (0)