diff -r 1940b72b0a02 Lib/test/test_dtrace.py --- a/Lib/test/test_dtrace.py Tue Nov 08 20:34:22 2016 +0200 +++ b/Lib/test/test_dtrace.py Thu Nov 10 20:41:24 2016 +0100 @@ -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 -r 1940b72b0a02 Lib/test/test_shutil.py --- a/Lib/test/test_shutil.py Tue Nov 08 20:34:22 2016 +0200 +++ b/Lib/test/test_shutil.py Thu Nov 10 20:41:24 2016 +0100 @@ -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 -r 1940b72b0a02 Lib/test/test_subprocess.py --- a/Lib/test/test_subprocess.py Tue Nov 08 20:34:22 2016 +0200 +++ b/Lib/test/test_subprocess.py Thu Nov 10 20:41:24 2016 +0100 @@ -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: