summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorAntoine Pitrou <pitrou@free.fr>2017-05-02 15:20:00 (GMT)
committerGitHub <noreply@github.com>2017-05-02 15:20:00 (GMT)
commit495b5021e73e3c4b6404417ecf4fa83aa10297f0 (patch)
tree74eebc9c19415d534342984ed3fe25f22a194f3e /Lib/test/test_socket.py
parentb0d82036549074357717d130a772d1e2ebc8ea01 (diff)
downloadcpython-495b5021e73e3c4b6404417ecf4fa83aa10297f0.zip
cpython-495b5021e73e3c4b6404417ecf4fa83aa10297f0.tar.gz
cpython-495b5021e73e3c4b6404417ecf4fa83aa10297f0.tar.bz2
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
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 2155d63..5e37fc6 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)