From 495b5021e73e3c4b6404417ecf4fa83aa10297f0 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 2 May 2017 17:20:00 +0200 Subject: bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux (#1370) * bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux * Add NEWS entry --- Lib/test/test_socket.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Lib/test/test_socket.py') diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 2155d630dd..5e37fc608f 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -4682,6 +4682,10 @@ class TestUnixDomain(unittest.TestCase): else: raise + def testUnbound(self): + # Issue #30205 + self.assertEqual(self.sock.getsockname(), '') + def testStrAddr(self): # Test binding to and retrieving a normal string pathname. path = os.path.abspath(support.TESTFN) -- cgit v1.2.1