mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Fix test for socket.getfqdn() to also include the name returned by
socket.gethostname() in the check for a valid return. Also clarified docs (official and docstring) that the value from gethostname() is returned if gethostbyaddr() doesn't do the job.
This commit is contained in:
parent
94d6201eb0
commit
01668a1ab9
3 changed files with 4 additions and 4 deletions
|
@ -267,7 +267,7 @@ class GeneralModuleTests(unittest.TestCase):
|
|||
except socket.error:
|
||||
# Probably a similar problem as above; skip this test
|
||||
return
|
||||
all_host_names = [hname] + aliases
|
||||
all_host_names = [hostname, hname] + aliases
|
||||
fqhn = socket.getfqdn()
|
||||
if not fqhn in all_host_names:
|
||||
self.fail("Error testing host resolution mechanisms.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue