Skip to content

Commit f7e4d09

Browse files
committed
gh-160561: Use AF_UNIX in the fromfd() error test, matching the review suggestion
1 parent 5643f6f commit f7e4d09

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Lib/test/test_socket.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3204,9 +3204,9 @@ def testFromFdError(self):
32043204
with self.assertRaises(TypeError):
32053205
socket.fromfd(fd, "not-a-valid-family", socket.SOCK_STREAM)
32063206
with self.assertRaises(TypeError):
3207-
socket.fromfd(fd, socket.AF_INET, "not-a-valid-type")
3207+
socket.fromfd(fd, socket.AF_UNIX, "not-a-valid-type")
32083208
with self.assertRaises(OverflowError):
3209-
socket.fromfd(fd, socket.AF_INET, 1 << 100)
3209+
socket.fromfd(fd, socket.AF_UNIX, 1 << 100)
32103210

32113211
self.assertEqual(os_helper.fd_count(), fd_count_before)
32123212

0 commit comments

Comments
 (0)