]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] 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:50:36 +0000 (18:50 +0200)
committerGitHub <noreply@github.com>
Wed, 24 Jun 2026 16:50:36 +0000 (16:50 +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 0570257c5230d5102d6a1bded9ff4af34c18b9bc..fe2a4b8ad12a501fa68372a99e1f24a996ef0d0c 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 b2ca8cf2140a10824b24c573dbb48c99557b44be..46466ecf2cd99ecea4cdd96c31597b01f3df70fd 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.assertTrue(data["env.tag"].startswith("2."), data["env.tag"])
 
index aa2498f7e0854313786b0abed69cc155be22a9b9..be8e4dc09aaaeec25eacee8ef7392c2d5df3ebf4 100644 (file)
@@ -1109,6 +1109,7 @@ class PathTest(test_pathlib_abc.DummyPathTest, 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 342e1e03732236067a1cf5973c879b753fa879c7..66e02023cac96df4a9f5453bc64246979a7f4355 100644 (file)
@@ -1409,6 +1409,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(
@@ -1499,6 +1500,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(