summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_socket.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 180d965..adeca56 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -289,7 +289,13 @@ class GeneralModuleTests(unittest.TestCase):
# Find one service that exists, then check all the related interfaces.
# I've ordered this by protocols that have both a tcp and udp
# protocol, at least for modern Linuxes.
- for service in ('echo', 'daytime', 'domain'):
+ if sys.platform in ('freebsd4', 'freebsd5'):
+ # avoid the 'echo' service on this platform, as there is an
+ # assumption breaking non-standard port/protocol entry
+ services = ('daytime', 'qotd', 'domain')
+ else:
+ services = ('echo', 'daytime', 'domain')
+ for service in services:
try:
port = socket.getservbyname(service, 'tcp')
break