Skip to content

Commit bc8b07d

Browse files
committed
pythongh-128116: Skip test_socket VSOCK testStream() on PermissionError (python#128120)
(cherry picked from commit cbfe302)
1 parent 6a286e6 commit bc8b07d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_socket.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,10 @@ def clientSetUp(self):
499499
self.cli.connect((cid, VSOCKPORT))
500500

501501
def testStream(self):
502-
msg = self.conn.recv(1024)
502+
try:
503+
msg = self.conn.recv(1024)
504+
except PermissionError as exc:
505+
self.skipTest(repr(exc))
503506
self.assertEqual(msg, MSG)
504507

505508
def _testStream(self):

0 commit comments

Comments
 (0)