mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
gh-100374: Fixed a bug in socket.getfqdn() (gh-100375)
(cherry picked from commit 12be23cf3c
)
Co-authored-by: Dominic Socular <BBH@awsl.rip>
This commit is contained in:
parent
ae8520c709
commit
b2076b0071
3 changed files with 7 additions and 2 deletions
|
@ -1760,6 +1760,10 @@ class GeneralModuleTests(unittest.TestCase):
|
|||
)
|
||||
self.assertEqual(sockaddr, ('ff02::1de:c0:face:8d', 1234, 0, 0))
|
||||
|
||||
def test_getfqdn_filter_localhost(self):
|
||||
self.assertEqual(socket.getfqdn(), socket.getfqdn("0.0.0.0"))
|
||||
self.assertEqual(socket.getfqdn(), socket.getfqdn("::"))
|
||||
|
||||
@unittest.skipUnless(socket_helper.IPV6_ENABLED, 'IPv6 required for this test.')
|
||||
@unittest.skipIf(sys.platform == 'win32', 'does not work on Windows')
|
||||
@unittest.skipIf(AIX, 'Symbolic scope id does not work')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue