mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-40165: Suppress stderr when checking if test_stty_match should be skipped (GH-19325)
This commit is contained in:
parent
cae2275949
commit
d5a980a607
1 changed files with 5 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue