From: Victor Stinner Date: Fri, 20 Dec 2024 12:38:00 +0000 (+0100) Subject: gh-128116: Skip test_socket VSOCK testStream() on PermissionError (#128120) X-Git-Tag: v3.14.0a4~225 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cbfe3023e46b544b80ea1a38a8c900c6fb881554;p=thirdparty%2FPython%2Fcpython.git gh-128116: Skip test_socket VSOCK testStream() on PermissionError (#128120) --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 307d6e886c61..aac213e36aec 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -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):