From cbfe3023e46b544b80ea1a38a8c900c6fb881554 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 20 Dec 2024 13:38:00 +0100 Subject: [PATCH] gh-128116: Skip test_socket VSOCK testStream() on PermissionError (#128120) --- Lib/test/test_socket.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 307d6e886c6..aac213e36ae 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -547,7 +547,10 @@ def clientSetUp(self): 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):