Skip to content

Commit 0360a9d

Browse files
authored
Fix tests: getsockname() can return None on OS X on unbound sockets (#1400)
1 parent 9ed34a8 commit 0360a9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_socket.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4683,8 +4683,8 @@ def bind(self, sock, path):
46834683
raise
46844684

46854685
def testUnbound(self):
4686-
# Issue #30205
4687-
self.assertEqual(self.sock.getsockname(), '')
4686+
# Issue #30205 (note getsockname() can return None on OS X)
4687+
self.assertIn(self.sock.getsockname(), ('', None))
46884688

46894689
def testStrAddr(self):
46904690
# Test binding to and retrieving a normal string pathname.

0 commit comments

Comments
 (0)