A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-July/045893.html below:

[Python-Dev] New test failure, test_socket, WinXP

[Python-Dev] New test failure, test_socket, WinXPGuido van Rossum guido at python.org
Tue Jul 6 06:39:17 CEST 2004
> >> Fails every time, in release and debug builds:
> >>
> >> test test_socket failed -- Traceback (most recent call last):
> >> File "C:\Code\python\lib\test\test_socket.py", line 311, in testGetServBy
> >>     eq(socket.getservbyport(port2), service)
> >> AssertionError: 'http' != 'www'
> 
> [Brett C.]
> > Does it pass if you change "www" to "http" on line 292?
> 
> Yup!  I'm not going to check that in, though -- I don't really know what
> this test is doing.

If on some platforms getservbyport(80) returns 'http' and on others
'www', the test should rely on neither.  Technically speaking, 'http'
is right and 'www' is wrong (there's no protocol named 'www'), but if
that's what a platform's getservbyport(80) returns, and if
socket.getservbyport() is supposed to be (as I hope) a simple wrapper
around the platform's getservbyport(), then we shouldn't be testing
specific values of the platform's function.

--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4