Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d5a980a

Browse files
authored
bpo-40165: Suppress stderr when checking if test_stty_match should be skipped (GH-19325)
1 parent cae2275 commit d5a980a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Lib/test/test_os.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3485,7 +3485,11 @@ def test_stty_match(self):
34853485
should work too.
34863486
"""
34873487
try:
3488-
size = subprocess.check_output(['stty', 'size']).decode().split()
3488+
size = (
3489+
subprocess.check_output(
3490+
["stty", "size"], stderr=subprocess.DEVNULL, text=True
3491+
).split()
3492+
)
34893493
except (FileNotFoundError, subprocess.CalledProcessError,
34903494
PermissionError):
34913495
self.skipTest("stty invocation failed")

0 commit comments

Comments
 (0)