]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-128116: Skip test_socket VSOCK testStream() on PermissionError (GH-128120...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 20 Dec 2024 13:32:58 +0000 (14:32 +0100)
committerGitHub <noreply@github.com>
Fri, 20 Dec 2024 13:32:58 +0000 (13:32 +0000)
gh-128116: Skip test_socket VSOCK testStream() on PermissionError (GH-128120)
(cherry picked from commit cbfe3023e46b544b80ea1a38a8c900c6fb881554)

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/test_socket.py

index 28764536fa0400ec1519ae2f5e3b0f6f90253013..c68a2f234d1e99ac0e95ce2bdd8d7a6b9a408ee8 100644 (file)
@@ -548,7 +548,10 @@ class ThreadedVSOCKSocketStreamTest(unittest.TestCase, ThreadableTest):
         self.cli.connect((cid, VSOCKPORT))
 
     def testStream(self):
-        msg = self.conn.recv(1024)
+        try:
+            msg = self.conn.recv(1024)
+        except PermissionError as exc:
+            self.skipTest(repr(exc))
         self.assertEqual(msg, MSG)
 
     def _testStream(self):