From d5a980a60790571ec88aba4e011c91e099e31e98 Mon Sep 17 00:00:00 2001 From: Batuhan Taskaya Date: Sun, 17 May 2020 01:38:02 +0300 Subject: bpo-40165: Suppress stderr when checking if test_stty_match should be skipped (GH-19325) --- Lib/test/test_os.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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") -- cgit v0.12