diff options
author | Antoine Pitrou <pitrou@free.fr> | 2017-05-02 21:48:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-02 21:48:26 (GMT) |
commit | 0360a9d015ddbc4e3d58e3ab4b433da27bf1db3a (patch) | |
tree | 514a2087caf2af7c2c3cbc2c3108e42e10afa4ce | |
parent | 9ed34a89532763cf89f5e11fffb91ef7dee29fed (diff) | |
download | cpython-0360a9d015ddbc4e3d58e3ab4b433da27bf1db3a.zip cpython-0360a9d015ddbc4e3d58e3ab4b433da27bf1db3a.tar.gz cpython-0360a9d015ddbc4e3d58e3ab4b433da27bf1db3a.tar.bz2 |
Fix tests: getsockname() can return None on OS X on unbound sockets (#1400)
-rw-r--r-- | Lib/test/test_socket.py | 4 |
1 files 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. |