Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Tests Failing while Installin

Tags:

python

I'm using Ubuntu 14.04 and while installing Python 3.5.1 , after running make test I got the following error.

3 tests failed again:
    test_httplib test_ssl test_urllibnet

test_urllibnet

    test test_urllibnet failed -- Traceback (most recent call last):
  File "/home/user/Softwares/Python-3.5.1/Lib/test/test_urllibnet.py", line 100, in test_getcode
    self.assertEqual(code, 404)
AssertionError: 500 != 404

test_httplib

    test test_httplib failed -- Traceback (most recent call last):
  File "/home/user/Softwares/Python-3.5.1/Lib/test/test_httplib.py", line 1325, in test_networked_good_cert
    h.request('GET', '/')
  File "/home/user/Softwares/Python-3.5.1/Lib/http/client.py", line 1083, in request
    self._send_request(method, url, body, headers)
  File "/home/user/Softwares/Python-3.5.1/Lib/http/client.py", line 1128, in _send_request
    self.endheaders(body)
  File "/home/user/Softwares/Python-3.5.1/Lib/http/client.py", line 1079, in endheaders
    self._send_output(message_body)
  File "/home/user/Softwares/Python-3.5.1/Lib/http/client.py", line 911, in _send_output
    self.send(msg)
  File "/home/user/Softwares/Python-3.5.1/Lib/http/client.py", line 854, in send
    self.connect()
  File "/home/user/Softwares/Python-3.5.1/Lib/http/client.py", line 1237, in connect
    server_hostname=server_hostname)
  File "/home/user/Softwares/Python-3.5.1/Lib/ssl.py", line 376, in wrap_socket
    _context=self)
  File "/home/user/Softwares/Python-3.5.1/Lib/ssl.py", line 747, in __init__
    self.do_handshake()
  File "/home/user/Softwares/Python-3.5.1/Lib/ssl.py", line 983, in do_handshake
    self._sslobj.do_handshake()
  File "/home/user/Softwares/Python-3.5.1/Lib/ssl.py", line 628, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)

test_ssl

Resource 'sha256.tbs-internet.com' is not available
/home/user/Softwares/Python-3.5.1/Lib/unittest/case.py:628: ResourceWarning: unclosed <ssl.SSLSocket fd=4, family=AddressFamily.AF_INET, type=2049, proto=0, laddr=('192.168.0.9', 42188), raddr=('82.94.164.164', 443)>
  outcome.errors.clear()
/home/user/Softwares/Python-3.5.1/Lib/unittest/case.py:628: ResourceWarning: unclosed <ssl.SSLSocket fd=4, family=AddressFamily.AF_INET, type=2049, proto=0, laddr=('192.168.0.9', 42198), raddr=('82.94.164.164', 443)>
  outcome.errors.clear()
/home/user/Softwares/Python-3.5.1/Lib/unittest/case.py:628: ResourceWarning: unclosed <ssl.SSLSocket fd=4, family=AddressFamily.AF_INET, type=2049, proto=0, laddr=('192.168.0.9', 42213), raddr=('82.94.164.164', 443)>
  outcome.errors.clear()
/home/user/Softwares/Python-3.5.1/Lib/unittest/case.py:628: ResourceWarning: unclosed <socket.socket fd=4, family=AddressFamily.AF_INET, type=2049, proto=0, laddr=('192.168.0.9', 42235), raddr=('82.94.164.164', 443)>
  outcome.errors.clear()
test test_ssl failed -- multiple errors occurred; run in verbose mode for details

Will it affect in future if I proceed with installation? Any reason for this? Any solution to correct this?

Thank you

like image 902
Pardha.Saradhi Avatar asked Mar 06 '26 03:03

Pardha.Saradhi


1 Answers

To me this looks like there is a problem with internet connectivity from your host. try

wget http://www.google.com 

and see if you get any results.

ANSWER:

Looks like I found the issue: It's a bug in test.py from 2015 psf.upfronthosting.co.za/issue25674 I would recommend you get or reinstall Python from a new location, this bug was patched

like image 167
CareFree Avatar answered Mar 08 '26 15:03

CareFree



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!