]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] 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:55:45 +0000 (18:55 +0200)
committerGitHub <noreply@github.com>
Wed, 24 Jun 2026 16:55:45 +0000 (16:55 +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 9f1e2e250fe854ada3c9751c76e9032959711327..86c5ca4058e7d368b89ab28b445ab4836581034d 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 a1ea69a6b906e8e66f9518cf2999123f2406f373..a7fa9865b6132483768fc122325fe224f2e420b8 100644 (file)
@@ -2769,6 +2769,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 d25f0ac159afb8b296c4b583bf9c3a04c284958f..9392c7501d5359e9b3cb6ab802bd394607c212d6 100644 (file)
@@ -1415,6 +1415,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(
@@ -1505,6 +1506,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(