]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] 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:39:26 +0000 (14:39 +0100)
committerGitHub <noreply@github.com>
Fri, 20 Dec 2024 13:39:26 +0000 (13:39 +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 b40ad28f7a7dad24f2a1dc8eb3487fe660b7e823..8fda0d7f8bac54ea875597da2c71abb9ff9b4668 100644 (file)
@@ -513,7 +513,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):