summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBatuhan Taskaya <batuhanosmantaskaya@gmail.com>2020-05-16 22:38:02 (GMT)
committerGitHub <noreply@github.com>2020-05-16 22:38:02 (GMT)
commitd5a980a60790571ec88aba4e011c91e099e31e98 (patch)
treeac5796a06da68063170e0cbdfb624ae5fbdc6d6e
parentcae2275949157490b469d79ef250387eca324b9e (diff)
downloadcpython-d5a980a60790571ec88aba4e011c91e099e31e98.zip
cpython-d5a980a60790571ec88aba4e011c91e099e31e98.tar.gz
cpython-d5a980a60790571ec88aba4e011c91e099e31e98.tar.bz2
bpo-40165: Suppress stderr when checking if test_stty_match should be skipped (GH-19325)
-rw-r--r--Lib/test/test_os.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 362ba9e..0db7d30 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -3485,7 +3485,11 @@ class TermsizeTests(unittest.TestCase):
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")