Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 323fc9c commit 4bb22caCopy full SHA for 4bb22ca
Lib/test/test_pty.py
@@ -69,6 +69,15 @@ def _readline(fd):
69
reader = io.FileIO(fd, mode='rb', closefd=False)
70
return reader.readline()
71
72
+def expectedFailureIfStdinIsTTY(fun):
73
+ # avoid isatty() for now
74
+ try:
75
+ tty.tcgetattr(pty.STDIN_FILENO)
76
+ return unittest.expectedFailure(fun)
77
+ except tty.error:
78
+ pass
79
+ return fun
80
+
81
def expectedFailureOnBSD(fun):
82
if platform.system().endswith("BSD"):
83
return unittest.expectedFailure(fun)
@@ -103,7 +112,7 @@ def handle_sighup(signum, frame):
103
112
# signal: just ignore the signal.
104
113
pass
105
114
106
- @unittest.expectedFailure
115
+ @expectedFailureIfStdinIsTTY
107
116
def test_openpty(self):
108
117
try:
109
118
mode = tty.tcgetattr(pty.STDIN_FILENO)
0 commit comments