summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_shutil.py
diff options
context:
space:
mode:
authorXavier de Gaye <xdegaye@users.sourceforge.net>2016-11-14 16:14:42 (GMT)
committerXavier de Gaye <xdegaye@users.sourceforge.net>2016-11-14 16:14:42 (GMT)
commit38c8b7d2922c20010930eedacdccf61fb2246761 (patch)
tree46380aa06548d786d0f0990bdbb04122e2e3f116 /Lib/test/test_shutil.py
parent8bf43e6d0b3dc5d76e9d99656528ccdcd5dd6e6a (diff)
downloadcpython-38c8b7d2922c20010930eedacdccf61fb2246761.zip
cpython-38c8b7d2922c20010930eedacdccf61fb2246761.tar.gz
cpython-38c8b7d2922c20010930eedacdccf61fb2246761.tar.bz2
Issue #28662: Catch PermissionError in tests when spawning a non existent program
Diffstat (limited to 'Lib/test/test_shutil.py')
-rw-r--r--Lib/test/test_shutil.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index d93efb8..af5f00f 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -1869,7 +1869,8 @@ class TermsizeTests(unittest.TestCase):
"""
try:
size = subprocess.check_output(['stty', 'size']).decode().split()
- except (FileNotFoundError, subprocess.CalledProcessError):
+ except (FileNotFoundError, PermissionError,
+ subprocess.CalledProcessError):
self.skipTest("stty invocation failed")
expected = (int(size[1]), int(size[0])) # reversed order