We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d09e17 commit 4ba515dCopy full SHA for 4ba515d
Lib/test/test_pty.py
@@ -5,6 +5,7 @@
5
import_module('termios')
6
7
import errno
8
+import pathlib
9
import pty
10
import os
11
import sys
@@ -75,6 +76,14 @@ def _readline(fd):
75
76
77
def expectedFailureIfStdinIsTTY(fun):
78
# avoid isatty() for now
79
+ PLATFORM = platform.system()
80
+ if PLATFORM == "Linux":
81
+ os_release = pathlib.Path("/etc/os-release")
82
+ if os_release.exists():
83
+ # Actually the file has complex multi-line structure,
84
+ # these is no need to parse it for Gentoo check
85
+ if 'gentoo' in os_release.read_text().lower():
86
+ return fun
87
try:
88
tty.tcgetattr(pty.STDIN_FILENO)
89
return unittest.expectedFailure(fun)
0 commit comments