From 0360a9d015ddbc4e3d58e3ab4b433da27bf1db3a Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 2 May 2017 23:48:26 +0200 Subject: Fix tests: getsockname() can return None on OS X on unbound sockets (#1400) --- Lib/test/test_socket.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 5e37fc6..f28f7d6 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -4683,8 +4683,8 @@ class TestUnixDomain(unittest.TestCase): 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. -- cgit v0.12