Skip to content

Commit

Permalink
[3.12] gh-128116: Skip test_socket VSOCK testStream() on PermissionEr…
Browse files Browse the repository at this point in the history
…ror (GH-128120) (#128124)

gh-128116: Skip test_socket VSOCK testStream() on PermissionError (GH-128120)
(cherry picked from commit cbfe302)

Co-authored-by: Victor Stinner <vstinner@python.org>
  • Loading branch information
miss-islington and vstinner authored Dec 20, 2024
1 parent 825b83d commit 23e8fc2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lib/test/test_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,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):
Expand Down

0 comments on commit 23e8fc2

Please sign in to comment.