diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 5e37fc608f2..f28f7d6816e 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -4683,8 +4683,8 @@ def bind(self, sock, path): raise def testUnbound(self): - # Issue #30205 - self.assertEqual(self.sock.getsockname(), '') + # Issue #30205 (note getsockname() can return None on OS X) + self.assertIn(self.sock.getsockname(), ('', None)) def testStrAddr(self): # Test binding to and retrieving a normal string pathname.