]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40165: Suppress stderr when checking if test_stty_match should be skipped (GH...
authorBatuhan Taskaya <batuhanosmantaskaya@gmail.com>
Sat, 16 May 2020 22:38:02 +0000 (01:38 +0300)
committerGitHub <noreply@github.com>
Sat, 16 May 2020 22:38:02 +0000 (23:38 +0100)
Lib/test/test_os.py

index 362ba9e1042cbc233650b9079cc85bf7ae68ca03..0db7d30f6385e98755a0f23f5272e33cb7b43fcc 100644 (file)
@@ -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")