gh-128116: Skip test_socket VSOCK testStream() on PermissionError (#128120)

This commit is contained in:
Victor Stinner 2024-12-20 13:38:00 +01:00 committed by GitHub
parent 0974d7bb86
commit cbfe3023e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -547,7 +547,10 @@ def clientSetUp(self):
self.cli.connect((cid, VSOCKPORT)) self.cli.connect((cid, VSOCKPORT))
def testStream(self): def testStream(self):
try:
msg = self.conn.recv(1024) msg = self.conn.recv(1024)
except PermissionError as exc:
self.skipTest(repr(exc))
self.assertEqual(msg, MSG) self.assertEqual(msg, MSG)
def _testStream(self): def _testStream(self):