Skip to content

Commit 86b7495

Browse files
committed
gh-160561: Match the reviewed test exactly: no comment, AF_UNIX
1 parent 3cf12d1 commit 86b7495

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎Lib/test/test_socket.py‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3196,16 +3196,15 @@ def _testFromFd(self):
31963196
self.serv_conn.send(MSG)
31973197

31983198
def testFromFdError(self):
3199-
# Make sure that the fromfd() duplicated socket is closed on error.
32003199
fd = self.cli_conn.fileno()
32013200
fd_count_before = os_helper.fd_count()
32023201

32033202
with self.assertRaises(TypeError):
32043203
socket.fromfd(fd, "not-a-valid-family", socket.SOCK_STREAM)
32053204
with self.assertRaises(TypeError):
3206-
socket.fromfd(fd, socket.AF_INET, "not-a-valid-type")
3205+
socket.fromfd(fd, socket.AF_UNIX, "not-a-valid-type")
32073206
with self.assertRaises(OverflowError):
3208-
socket.fromfd(fd, socket.AF_INET, 1 << 100)
3207+
socket.fromfd(fd, socket.AF_UNIX, 1 << 100)
32093208

32103209
self.assertEqual(os_helper.fd_count(), fd_count_before)
32113210

0 commit comments

Comments
 (0)