From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:32:58 +0000 (+0100) Subject: [3.13] gh-128116: Skip test_socket VSOCK testStream() on PermissionError (GH-128120... X-Git-Tag: v3.13.2~179 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=43586a480421981013e77ae60cb8114c5ccaf688;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-128116: Skip test_socket VSOCK testStream() on PermissionError (GH-128120) (#128123) gh-128116: Skip test_socket VSOCK testStream() on PermissionError (GH-128120) (cherry picked from commit cbfe3023e46b544b80ea1a38a8c900c6fb881554) Co-authored-by: Victor Stinner --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 28764536fa04..c68a2f234d1e 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -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):