[Python-checkins] cpython (merge 3.6 -> default): Issue #28662: Merge 3.6
xavier.degaye
python-checkins at python.org
Mon Nov 14 11:16:17 EST 2016
https://hg.python.org/cpython/rev/c3f7d81d9050
changeset: 105106:c3f7d81d9050
parent: 105104:3cf248d10bed
parent: 105105:1b2b2cb8f962
user: Xavier de Gaye <xdegaye at users.sourceforge.net>
date: Mon Nov 14 17:15:45 2016 +0100
summary:
Issue #28662: Merge 3.6
files:
Lib/test/test_dtrace.py | 2 +-
Lib/test/test_shutil.py | 3 ++-
Lib/test/test_subprocess.py | 5 +++--
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/Lib/test/test_dtrace.py b/Lib/test/test_dtrace.py
--- a/Lib/test/test_dtrace.py
+++ b/Lib/test/test_dtrace.py
@@ -79,7 +79,7 @@
try:
output = self.trace(abspath("assert_usable" + self.EXTENSION))
output = output.strip()
- except FileNotFoundError as fnfe:
+ except (FileNotFoundError, PermissionError) as fnfe:
output = str(fnfe)
if output != "probe: success":
raise unittest.SkipTest(
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -1869,7 +1869,8 @@
"""
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
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -293,7 +293,8 @@
# Verify first that the call succeeds without the executable arg.
pre_args = [sys.executable, "-c"]
self._assert_python(pre_args)
- self.assertRaises(FileNotFoundError, self._assert_python, pre_args,
+ self.assertRaises((FileNotFoundError, PermissionError),
+ self._assert_python, pre_args,
executable="doesnotexist")
@unittest.skipIf(mswindows, "executable argument replaces shell")
@@ -2753,7 +2754,7 @@
self.assertEqual(proc.returncode, 1)
def test_invalid_args(self):
- with self.assertRaises(FileNotFoundError) as c:
+ with self.assertRaises((FileNotFoundError, PermissionError)) as c:
with subprocess.Popen(['nonexisting_i_hope'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE) as proc:
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list