[Python-checkins] bpo-40165: Suppress stderr when checking if test_stty_match should be skipped (GH-19325)
Batuhan Taskaya
webhook-mailer at python.org
Sat May 16 18:38:07 EDT 2020
https://github.com/python/cpython/commit/d5a980a60790571ec88aba4e011c91e099e31e98
commit: d5a980a60790571ec88aba4e011c91e099e31e98
branch: master
author: Batuhan Taskaya <batuhanosmantaskaya at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020-05-16T23:38:02+01:00
summary:
bpo-40165: Suppress stderr when checking if test_stty_match should be skipped (GH-19325)
files:
M Lib/test/test_os.py
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 362ba9e1042cb..0db7d30f6385e 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -3485,7 +3485,11 @@ def test_stty_match(self):
should work too.
"""
try:
- size = subprocess.check_output(['stty', 'size']).decode().split()
+ size = (
+ subprocess.check_output(
+ ["stty", "size"], stderr=subprocess.DEVNULL, text=True
+ ).split()
+ )
except (FileNotFoundError, subprocess.CalledProcessError,
PermissionError):
self.skipTest("stty invocation failed")
More information about the Python-checkins
mailing list