[issue20868] Lib/test/test_socket.py: skip testGetServBy if /etc/services is not found

Steap report at bugs.python.org
Sat Mar 15 05:31:16 CET 2014


Steap added the comment:

I did not know that /etc/services is not always used :/

The main issue is that when you run the test suite in a chroot (to do "pure" builds) or in a network sandbox (for other functions). I get the following errors:

======================================================================
ERROR: testGetServBy (test.test_socket.GeneralModuleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python-3.3.4.drv-0/Python-3.3.4/Lib/test/test_socket.py", line 840, in testGetServBy
    raise socket.error
OSError

======================================================================
ERROR: testGetaddrinfo (test.test_socket.GeneralModuleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python-3.3.4.drv-0/Python-3.3.4/Lib/test/test_socket.py", line 1126, in testGetaddrinfo
    socket.getaddrinfo(HOST, "http")
socket.gaierror: [Errno -8] Servname not supported for ai_socktype

======================================================================
ERROR: test_idna (test.test_socket.GeneralModuleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python-3.3.4.drv-0/Python-3.3.4/Lib/test/test_socket.py", line 1186, in test_idna
    socket.gethostbyname('\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435.python.org')
socket.gaierror: [Errno -2] Name or service not known

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20868>
_______________________________________


More information about the Python-bugs-list mailing list