]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.15] Re-raise unexpected exceptions instead of swallowing them in various tests...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 24 Jun 2026 16:53:16 +0000 (18:53 +0200)
committerGitHub <noreply@github.com>
Wed, 24 Jun 2026 16:53:16 +0000 (16:53 +0000)
(cherry picked from commit 6c3da17d1f333f6bd4c07d11e2e304159d550822)

Co-authored-by: An Long <aisk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
Lib/test/test_fcntl.py
Lib/test/test_launcher.py
Lib/test/test_pathlib/test_pathlib.py
Lib/test/test_socket.py

index 222b69a6d250cd3b398d10d7e9154f9eaec42e46..f20a9d407670a9cafa144dda40672eec9ea12845 100644 (file)
@@ -151,6 +151,7 @@ class TestFcntl(unittest.TestCase):
             except OSError as exc:
                 if exc.errno == errno.EINVAL:
                     self.skipTest("F_NOTIFY not available by this environment")
+                raise
             fcntl.fcntl(fd, cmd, flags)
         finally:
             os.close(fd)
index c522bc1c2c093c7d69c56b56257493c5f9f07acc..795890bd7e4b473c875babb11dd6232508f9f9e9 100644 (file)
@@ -469,6 +469,7 @@ class TestLauncher(unittest.TestCase, RunPyMixin):
         except subprocess.CalledProcessError:
             if not is_installed("2.7"):
                 raise unittest.SkipTest("requires at least one Python 2.x install")
+            raise
         self.assertEqual("PythonCore", data["env.company"])
         self.assertStartsWith(data["env.tag"], "2.")
 
index 2cb4876f5c6400aeb9f92c7ff767aae651d1a7a9..aff66c8efedbbc0f6bc384f50454df12b1e064ae 100644 (file)
@@ -2870,6 +2870,7 @@ class PathTest(PurePathTest):
             if (isinstance(e, PermissionError) or
                     "AF_UNIX path too long" in str(e)):
                 self.skipTest("cannot bind Unix socket: " + str(e))
+            raise
         self.assertTrue(P.is_socket())
         self.assertFalse(P.is_fifo())
         self.assertFalse(P.is_file())
index e80a08685462184eb1fbdc82e1d456393fb12123..ea315fd45e3a049834f4bdd20ab8eed8cbd9f0ba 100644 (file)
@@ -1427,6 +1427,7 @@ class GeneralModuleTests(unittest.TestCase):
             except OSError as e:
                 if e.winerror == 10022:
                     self.skipTest('IPv6 might not be supported')
+                raise
 
         f = lambda a: inet_pton(AF_INET6, a)
         assertInvalid = lambda a: self.assertRaises(
@@ -1517,6 +1518,7 @@ class GeneralModuleTests(unittest.TestCase):
             except OSError as e:
                 if e.winerror == 10022:
                     self.skipTest('IPv6 might not be supported')
+                raise
 
         f = lambda a: inet_ntop(AF_INET6, a)
         assertInvalid = lambda a: self.assertRaises(