Fix tests: getsockname() can return None on OS X on unbound sockets (#1400)

This commit is contained in:
Antoine Pitrou 2017-05-02 23:48:26 +02:00 committed by GitHub
parent 9ed34a8953
commit 0360a9d015

View file

@ -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.