summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2005-03-11 00:04:17 (GMT)
committerBrett Cannon <bcannon@gmail.com>2005-03-11 00:04:17 (GMT)
commit01668a1ab93baacd3c68f8b0b3b0ca6d43f0f444 (patch)
tree62d596a9ce52ca561ab06516a8c293c2cc7095c0 /Lib/test/test_socket.py
parent94d6201eb066fc769786f0c52ffc859fc6169d50 (diff)
downloadcpython-01668a1ab93baacd3c68f8b0b3b0ca6d43f0f444.zip
cpython-01668a1ab93baacd3c68f8b0b3b0ca6d43f0f444.tar.gz
cpython-01668a1ab93baacd3c68f8b0b3b0ca6d43f0f444.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index e6cdb8b..bf2ecae 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -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.")