summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Pitrou <pitrou@free.fr>2017-05-02 23:48:26 +0200
committerGitHub <noreply@github.com>2017-05-02 23:48:26 +0200
commit0360a9d015ddbc4e3d58e3ab4b433da27bf1db3a (patch)
tree514a2087caf2af7c2c3cbc2c3108e42e10afa4ce
parent9ed34a89532763cf89f5e11fffb91ef7dee29fed (diff)
downloadcpython-git-0360a9d015ddbc4e3d58e3ab4b433da27bf1db3a.tar.gz
Fix tests: getsockname() can return None on OS X on unbound sockets (#1400)
-rw-r--r--Lib/test/test_socket.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 5e37fc608f..f28f7d6816 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.