]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-128116: Skip test_socket VSOCK testStream() on PermissionError (#128120)
authorVictor Stinner <vstinner@python.org>
Fri, 20 Dec 2024 12:38:00 +0000 (13:38 +0100)
committerGitHub <noreply@github.com>
Fri, 20 Dec 2024 12:38:00 +0000 (13:38 +0100)
Lib/test/test_socket.py

index 307d6e886c617fe42642cac137a818cf9bc895f5..aac213e36aecf0fc5b56376e12dfa6dcf07ce146 100644 (file)
@@ -547,7 +547,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):