* Package: dev-python/dugong-3.7.3 * Repository: gentoo * Maintainer: python@gentoo.org * USE: abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python3_7 test userland_GNU * FEATURES: network-sandbox preserve-libs sandbox test userpriv usersandbox >>> Unpacking source... >>> Unpacking dugong-3.7.3.tar.bz2 to /var/tmp/portage/dev-python/dugong-3.7.3/work >>> Source unpacked in /var/tmp/portage/dev-python/dugong-3.7.3/work >>> Preparing source in /var/tmp/portage/dev-python/dugong-3.7.3/work/dugong-3.7.3 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/dev-python/dugong-3.7.3/work/dugong-3.7.3 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/dev-python/dugong-3.7.3/work/dugong-3.7.3 ... * python3_7: running distutils-r1_run_phase distutils-r1_python_compile python3.7 setup.py build -j 4 running build running build_py creating /var/tmp/portage/dev-python/dugong-3.7.3/work/dugong-3.7.3-python3_7/lib/dugong copying ./dugong/__init__.py -> /var/tmp/portage/dev-python/dugong-3.7.3/work/dugong-3.7.3-python3_7/lib/dugong warning: build_py: byte-compiling is disabled, skipping. >>> Source compiled. >>> Test phase: dev-python/dugong-3.7.3 * python3_7: running distutils-r1_run_phase python_test ============================= test session starts ============================== platform linux -- Python 3.7.7, pytest-5.4.2, py-1.8.0, pluggy-0.13.1 -- /usr/bin/python3.7 cachedir: .pytest_cache rootdir: /var/tmp/portage/dev-python/dugong-3.7.3/work/dugong-3.7.3 collecting ... collected 124 items test/test_aio.py::test_aio_future PASSED [ 0%] test/test_dugong.py::test_connect_ssl SKIPPED [ 1%] test/test_dugong.py::test_invalid_ssl SKIPPED [ 2%] test/test_dugong.py::test_dns_one PASSED [ 3%] test/test_dugong.py::test_dns_two PASSED [ 4%] test/test_dugong.py::test_http_proxy[plain-None] PASSED [ 4%] test/test_dugong.py::test_http_proxy[plain-8080] PASSED [ 5%] test/test_dugong.py::test_connect_proxy[plain-None] PASSED [ 6%] test/test_dugong.py::test_connect_proxy[plain-8080] PASSED [ 7%] test/test_dugong.py::test_get_pipeline[plain] PASSED [ 8%] test/test_dugong.py::test_ssl_info[plain] PASSED [ 8%] test/test_dugong.py::test_blocking_send[plain] PASSED [ 9%] test/test_dugong.py::test_blocking_read[plain] PASSED [ 10%] test/test_dugong.py::test_discard[plain] PASSED [ 11%] test/test_dugong.py::test_discard_chunked[plain] PASSED [ 12%] test/test_dugong.py::test_read_text[plain] PASSED [ 12%] test/test_dugong.py::test_read_text2[plain] PASSED [ 13%] test/test_dugong.py::test_read_text3[plain] PASSED [ 14%] test/test_dugong.py::test_read_identity[plain] PASSED [ 15%] test/test_dugong.py::test_conn_close_1[plain] PASSED [ 16%] test/test_dugong.py::test_conn_close_2[plain] PASSED [ 16%] test/test_dugong.py::test_conn_close_3[plain] PASSED [ 17%] test/test_dugong.py::test_conn_close_4[plain] PASSED [ 18%] test/test_dugong.py::test_conn_close_5[plain] PASSED [ 19%] test/test_dugong.py::test_exhaust_buffer[plain] PASSED [ 20%] test/test_dugong.py::test_full_buffer[plain] PASSED [ 20%] test/test_dugong.py::test_readinto_identity[plain] PASSED [ 21%] test/test_dugong.py::test_read_chunked[plain] PASSED [ 22%] test/test_dugong.py::test_read_chunked2[plain] PASSED [ 23%] test/test_dugong.py::test_readinto_chunked[plain] PASSED [ 24%] test/test_dugong.py::test_double_read[plain] PASSED [ 25%] test/test_dugong.py::test_read_raw[plain] PASSED [ 25%] test/test_dugong.py::test_abort_read[plain] PASSED [ 26%] test/test_dugong.py::test_abort_co_read[plain] PASSED [ 27%] test/test_dugong.py::test_abort_write[plain] PASSED [ 28%] test/test_dugong.py::test_write_toomuch[plain] PASSED [ 29%] test/test_dugong.py::test_write_toolittle[plain] PASSED [ 29%] test/test_dugong.py::test_write_toolittle2[plain] PASSED [ 30%] test/test_dugong.py::test_write_toolittle3[plain] PASSED [ 31%] test/test_dugong.py::test_put[plain] PASSED [ 32%] test/test_dugong.py::test_put_separate[plain] PASSED [ 33%] test/test_dugong.py::test_100cont[plain] PASSED [ 33%] test/test_dugong.py::test_100cont_2[plain] PASSED [ 34%] test/test_dugong.py::test_100cont_3[plain] PASSED [ 35%] test/test_dugong.py::test_aborted_write1[plain] PASSED [ 36%] test/test_dugong.py::test_aborted_write2[plain] PASSED [ 37%] test/test_dugong.py::test_read_toomuch[plain] PASSED [ 37%] test/test_dugong.py::test_read_toolittle[plain] PASSED [ 38%] test/test_dugong.py::test_empty_response[plain] PASSED [ 39%] test/test_dugong.py::test_head[plain] PASSED [ 40%] test/test_dugong.py::test_smallbuffer[plain-63] PASSED [ 41%] test/test_dugong.py::test_smallbuffer[plain-64] PASSED [ 41%] test/test_dugong.py::test_smallbuffer[plain-65] PASSED [ 42%] test/test_dugong.py::test_smallbuffer[plain-100] PASSED [ 43%] test/test_dugong.py::test_smallbuffer[plain-99] PASSED [ 44%] test/test_dugong.py::test_smallbuffer[plain-103] PASSED [ 45%] test/test_dugong.py::test_smallbuffer[plain-500] PASSED [ 45%] test/test_dugong.py::test_smallbuffer[plain-511] PASSED [ 46%] test/test_dugong.py::test_smallbuffer[plain-512] PASSED [ 47%] test/test_dugong.py::test_smallbuffer[plain-513] PASSED [ 48%] test/test_dugong.py::test_mutable_read[plain] PASSED [ 49%] test/test_dugong.py::test_recv_timeout[plain] PASSED [ 50%] test/test_dugong.py::test_send_timeout[plain] PASSED [ 50%] test/test_dugong.py::test_http_proxy[ssl-None] FAILED [ 51%] test/test_dugong.py::test_http_proxy[ssl-8080] FAILED [ 52%] test/test_dugong.py::test_connect_proxy[ssl-None] FAILED [ 53%] test/test_dugong.py::test_connect_proxy[ssl-8080] FAILED [ 54%] test/test_dugong.py::test_get_pipeline[ssl] PASSED [ 54%] test/test_dugong.py::test_ssl_info[ssl] PASSED [ 55%] test/test_dugong.py::test_blocking_send[ssl] PASSED [ 56%] test/test_dugong.py::test_blocking_read[ssl] PASSED [ 57%] test/test_dugong.py::test_discard[ssl] PASSED [ 58%] test/test_dugong.py::test_discard_chunked[ssl] PASSED [ 58%] test/test_dugong.py::test_read_text[ssl] PASSED [ 59%] test/test_dugong.py::test_read_text2[ssl] PASSED [ 60%] test/test_dugong.py::test_read_text3[ssl] PASSED [ 61%] test/test_dugong.py::test_read_identity[ssl] PASSED [ 62%] test/test_dugong.py::test_conn_close_1[ssl] PASSED [ 62%] test/test_dugong.py::test_conn_close_2[ssl] PASSED [ 63%] test/test_dugong.py::test_conn_close_3[ssl] PASSED [ 64%] test/test_dugong.py::test_conn_close_4[ssl] PASSED [ 65%] test/test_dugong.py::test_conn_close_5[ssl] PASSED [ 66%] test/test_dugong.py::test_exhaust_buffer[ssl] PASSED [ 66%] test/test_dugong.py::test_full_buffer[ssl] PASSED [ 67%] test/test_dugong.py::test_readinto_identity[ssl] PASSED [ 68%] test/test_dugong.py::test_read_chunked[ssl] PASSED [ 69%] test/test_dugong.py::test_read_chunked2[ssl] PASSED [ 70%] test/test_dugong.py::test_readinto_chunked[ssl] PASSED [ 70%] test/test_dugong.py::test_double_read[ssl] PASSED [ 71%] test/test_dugong.py::test_read_raw[ssl] PASSED [ 72%] test/test_dugong.py::test_abort_read[ssl] PASSED [ 73%] test/test_dugong.py::test_abort_co_read[ssl] PASSED [ 74%] test/test_dugong.py::test_abort_write[ssl] PASSED [ 75%] test/test_dugong.py::test_write_toomuch[ssl] PASSED [ 75%] test/test_dugong.py::test_write_toolittle[ssl] PASSED [ 76%] test/test_dugong.py::test_write_toolittle2[ssl] PASSED [ 77%] test/test_dugong.py::test_write_toolittle3[ssl] PASSED [ 78%] test/test_dugong.py::test_put[ssl] PASSED [ 79%] test/test_dugong.py::test_put_separate[ssl] PASSED [ 79%] test/test_dugong.py::test_100cont[ssl] PASSED [ 80%] test/test_dugong.py::test_100cont_2[ssl] PASSED [ 81%] test/test_dugong.py::test_100cont_3[ssl] PASSED [ 82%] test/test_dugong.py::test_aborted_write1[ssl] PASSED [ 83%] test/test_dugong.py::test_aborted_write2[ssl] PASSED [ 83%] test/test_dugong.py::test_read_toomuch[ssl] PASSED [ 84%] test/test_dugong.py::test_read_toolittle[ssl] PASSED [ 85%] test/test_dugong.py::test_empty_response[ssl] PASSED [ 86%] test/test_dugong.py::test_head[ssl] PASSED [ 87%] test/test_dugong.py::test_smallbuffer[ssl-63] PASSED [ 87%] test/test_dugong.py::test_smallbuffer[ssl-64] PASSED [ 88%] test/test_dugong.py::test_smallbuffer[ssl-65] PASSED [ 89%] test/test_dugong.py::test_smallbuffer[ssl-100] PASSED [ 90%] test/test_dugong.py::test_smallbuffer[ssl-99] PASSED [ 91%] test/test_dugong.py::test_smallbuffer[ssl-103] PASSED [ 91%] test/test_dugong.py::test_smallbuffer[ssl-500] PASSED [ 92%] test/test_dugong.py::test_smallbuffer[ssl-511] PASSED [ 93%] test/test_dugong.py::test_smallbuffer[ssl-512] PASSED [ 94%] test/test_dugong.py::test_smallbuffer[ssl-513] PASSED [ 95%] test/test_dugong.py::test_mutable_read[ssl] PASSED [ 95%] test/test_dugong.py::test_recv_timeout[ssl] PASSED [ 96%] test/test_dugong.py::test_send_timeout[ssl] PASSED [ 97%] test/test_examples.py::test_httpcat PASSED [ 98%] test/test_examples.py::test_extract_links PASSED [ 99%] test/test_examples.py::test_pipeline1 PASSED [100%] =================================== FAILURES =================================== __________________________ test_http_proxy[ssl-None] ___________________________ self = def _try_fill_buffer(self): '''Try to fill up read buffer Returns the number of bytes read into buffer, or `None` if no data was available on the socket. Return zero if the TCP connection has been properly closed but the socket object still exists. On other problems (e.g. if the socket object has been destroyed or the connection interrupted), raise `ConnectionClosed`. ''' log.debug('start') rbuf = self._rbuf # If buffer is empty, reset so that we start filling from beginning if rbuf.b == rbuf.e: rbuf.b = 0 rbuf.e = 0 # There should be free capacity assert rbuf.e < len(rbuf.d) if self._sock is None: raise ConnectionClosed('connection has been closed locally') try: > len_ = self._sock.recv_into(memoryview(rbuf.d)[rbuf.e:]) E ConnectionResetError: [Errno 104] Connection reset by peer dugong/__init__.py:1343: ConnectionResetError During handling of the above exception, another exception occurred: http_server = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fbfffd4da10> test_port = None @pytest.mark.parametrize('test_port', (None, 8080)) @pytest.mark.no_ssl def test_http_proxy(http_server, monkeypatch, test_port): test_host = 'www.foobarz.invalid' test_path = '/someurl?barf' get_path = None def do_GET(self): nonlocal get_path get_path = self.path self.send_response(200) self.send_header("Content-Type", 'application/octet-stream') self.send_header("Content-Length", '0') self.end_headers() monkeypatch.setattr(MockRequestHandler, 'do_GET', do_GET) conn = HTTPConnection(test_host, test_port, proxy=(http_server.host, http_server.port)) try: conn.send_request('GET', test_path) > resp = conn.read_response() test/test_dugong.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dugong/__init__.py:764: in read_response return eval_coroutine(self.co_read_response(), self.timeout) dugong/__init__.py:1495: in eval_coroutine if not next(crt).poll(timeout=timeout): dugong/__init__.py:786: in co_read_response (status, reason) = yield from self._co_read_status() dugong/__init__.py:908: in _co_read_status line = yield from self._co_readstr_until(b'\r\n', MAX_LINE_SIZE) dugong/__init__.py:1295: in _co_readstr_until res = self._try_fill_buffer() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _try_fill_buffer(self): '''Try to fill up read buffer Returns the number of bytes read into buffer, or `None` if no data was available on the socket. Return zero if the TCP connection has been properly closed but the socket object still exists. On other problems (e.g. if the socket object has been destroyed or the connection interrupted), raise `ConnectionClosed`. ''' log.debug('start') rbuf = self._rbuf # If buffer is empty, reset so that we start filling from beginning if rbuf.b == rbuf.e: rbuf.b = 0 rbuf.e = 0 # There should be free capacity assert rbuf.e < len(rbuf.d) if self._sock is None: raise ConnectionClosed('connection has been closed locally') try: len_ = self._sock.recv_into(memoryview(rbuf.d)[rbuf.e:]) except (socket.timeout, ssl.SSLWantReadError, BlockingIOError): log.debug('done (nothing ready)') return None except (ConnectionResetError, BrokenPipeError): > raise ConnectionClosed('connection was interrupted') E dugong.ConnectionClosed: connection was interrupted dugong/__init__.py:1348: ConnectionClosed __________________________ test_http_proxy[ssl-8080] ___________________________ self = def _try_fill_buffer(self): '''Try to fill up read buffer Returns the number of bytes read into buffer, or `None` if no data was available on the socket. Return zero if the TCP connection has been properly closed but the socket object still exists. On other problems (e.g. if the socket object has been destroyed or the connection interrupted), raise `ConnectionClosed`. ''' log.debug('start') rbuf = self._rbuf # If buffer is empty, reset so that we start filling from beginning if rbuf.b == rbuf.e: rbuf.b = 0 rbuf.e = 0 # There should be free capacity assert rbuf.e < len(rbuf.d) if self._sock is None: raise ConnectionClosed('connection has been closed locally') try: > len_ = self._sock.recv_into(memoryview(rbuf.d)[rbuf.e:]) E ConnectionResetError: [Errno 104] Connection reset by peer dugong/__init__.py:1343: ConnectionResetError During handling of the above exception, another exception occurred: http_server = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fbfffc81390> test_port = 8080 @pytest.mark.parametrize('test_port', (None, 8080)) @pytest.mark.no_ssl def test_http_proxy(http_server, monkeypatch, test_port): test_host = 'www.foobarz.invalid' test_path = '/someurl?barf' get_path = None def do_GET(self): nonlocal get_path get_path = self.path self.send_response(200) self.send_header("Content-Type", 'application/octet-stream') self.send_header("Content-Length", '0') self.end_headers() monkeypatch.setattr(MockRequestHandler, 'do_GET', do_GET) conn = HTTPConnection(test_host, test_port, proxy=(http_server.host, http_server.port)) try: conn.send_request('GET', test_path) > resp = conn.read_response() test/test_dugong.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dugong/__init__.py:764: in read_response return eval_coroutine(self.co_read_response(), self.timeout) dugong/__init__.py:1495: in eval_coroutine if not next(crt).poll(timeout=timeout): dugong/__init__.py:786: in co_read_response (status, reason) = yield from self._co_read_status() dugong/__init__.py:908: in _co_read_status line = yield from self._co_readstr_until(b'\r\n', MAX_LINE_SIZE) dugong/__init__.py:1295: in _co_readstr_until res = self._try_fill_buffer() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _try_fill_buffer(self): '''Try to fill up read buffer Returns the number of bytes read into buffer, or `None` if no data was available on the socket. Return zero if the TCP connection has been properly closed but the socket object still exists. On other problems (e.g. if the socket object has been destroyed or the connection interrupted), raise `ConnectionClosed`. ''' log.debug('start') rbuf = self._rbuf # If buffer is empty, reset so that we start filling from beginning if rbuf.b == rbuf.e: rbuf.b = 0 rbuf.e = 0 # There should be free capacity assert rbuf.e < len(rbuf.d) if self._sock is None: raise ConnectionClosed('connection has been closed locally') try: len_ = self._sock.recv_into(memoryview(rbuf.d)[rbuf.e:]) except (socket.timeout, ssl.SSLWantReadError, BlockingIOError): log.debug('done (nothing ready)') return None except (ConnectionResetError, BrokenPipeError): > raise ConnectionClosed('connection was interrupted') E dugong.ConnectionClosed: connection was interrupted dugong/__init__.py:1348: ConnectionClosed _________________________ test_connect_proxy[ssl-None] _________________________ self = def _try_fill_buffer(self): '''Try to fill up read buffer Returns the number of bytes read into buffer, or `None` if no data was available on the socket. Return zero if the TCP connection has been properly closed but the socket object still exists. On other problems (e.g. if the socket object has been destroyed or the connection interrupted), raise `ConnectionClosed`. ''' log.debug('start') rbuf = self._rbuf # If buffer is empty, reset so that we start filling from beginning if rbuf.b == rbuf.e: rbuf.b = 0 rbuf.e = 0 # There should be free capacity assert rbuf.e < len(rbuf.d) if self._sock is None: raise ConnectionClosed('connection has been closed locally') try: > len_ = self._sock.recv_into(memoryview(rbuf.d)[rbuf.e:]) E ConnectionResetError: [Errno 104] Connection reset by peer dugong/__init__.py:1343: ConnectionResetError During handling of the above exception, another exception occurred: http_server = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fbfffda9b90> test_port = None @pytest.mark.parametrize('test_port', (None, 8080)) @pytest.mark.no_ssl def test_connect_proxy(http_server, monkeypatch, test_port): test_host = 'www.foobarz.invalid' test_path = '/someurl?barf' connect_path = None def do_CONNECT(self): # Pretend we're the remote server too nonlocal connect_path connect_path = self.path self.send_response(200) self.end_headers() self.close_connection = 0 monkeypatch.setattr(MockRequestHandler, 'do_CONNECT', do_CONNECT, raising=False) get_path = None def do_GET(self): nonlocal get_path get_path = self.path self.send_response(200) self.send_header("Content-Type", 'application/octet-stream') self.send_header("Content-Length", '0') self.end_headers() monkeypatch.setattr(MockRequestHandler, 'do_GET', do_GET) # We don't *actually* want to establish SSL, that'd be # to complex for our mock server monkeypatch.setattr('ssl.match_hostname', lambda x,y: True) conn = HTTPConnection(test_host, test_port, proxy=(http_server.host, http_server.port), ssl_context=FakeSSLContext()) try: > conn.send_request('GET', test_path) test/test_dugong.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dugong/__init__.py:569: in send_request self.timeout) dugong/__init__.py:1495: in eval_coroutine if not next(crt).poll(timeout=timeout): dugong/__init__.py:596: in co_send_request self.connect() dugong/__init__.py:487: in connect eval_coroutine(self._co_tunnel(), self.timeout) dugong/__init__.py:1495: in eval_coroutine if not next(crt).poll(timeout=timeout): dugong/__init__.py:529: in _co_tunnel (status, reason) = yield from self._co_read_status() dugong/__init__.py:908: in _co_read_status line = yield from self._co_readstr_until(b'\r\n', MAX_LINE_SIZE) dugong/__init__.py:1295: in _co_readstr_until res = self._try_fill_buffer() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _try_fill_buffer(self): '''Try to fill up read buffer Returns the number of bytes read into buffer, or `None` if no data was available on the socket. Return zero if the TCP connection has been properly closed but the socket object still exists. On other problems (e.g. if the socket object has been destroyed or the connection interrupted), raise `ConnectionClosed`. ''' log.debug('start') rbuf = self._rbuf # If buffer is empty, reset so that we start filling from beginning if rbuf.b == rbuf.e: rbuf.b = 0 rbuf.e = 0 # There should be free capacity assert rbuf.e < len(rbuf.d) if self._sock is None: raise ConnectionClosed('connection has been closed locally') try: len_ = self._sock.recv_into(memoryview(rbuf.d)[rbuf.e:]) except (socket.timeout, ssl.SSLWantReadError, BlockingIOError): log.debug('done (nothing ready)') return None except (ConnectionResetError, BrokenPipeError): > raise ConnectionClosed('connection was interrupted') E dugong.ConnectionClosed: connection was interrupted dugong/__init__.py:1348: ConnectionClosed _________________________ test_connect_proxy[ssl-8080] _________________________ self = def _try_fill_buffer(self): '''Try to fill up read buffer Returns the number of bytes read into buffer, or `None` if no data was available on the socket. Return zero if the TCP connection has been properly closed but the socket object still exists. On other problems (e.g. if the socket object has been destroyed or the connection interrupted), raise `ConnectionClosed`. ''' log.debug('start') rbuf = self._rbuf # If buffer is empty, reset so that we start filling from beginning if rbuf.b == rbuf.e: rbuf.b = 0 rbuf.e = 0 # There should be free capacity assert rbuf.e < len(rbuf.d) if self._sock is None: raise ConnectionClosed('connection has been closed locally') try: > len_ = self._sock.recv_into(memoryview(rbuf.d)[rbuf.e:]) E ConnectionResetError: [Errno 104] Connection reset by peer dugong/__init__.py:1343: ConnectionResetError During handling of the above exception, another exception occurred: http_server = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fbfffc3c290> test_port = 8080 @pytest.mark.parametrize('test_port', (None, 8080)) @pytest.mark.no_ssl def test_connect_proxy(http_server, monkeypatch, test_port): test_host = 'www.foobarz.invalid' test_path = '/someurl?barf' connect_path = None def do_CONNECT(self): # Pretend we're the remote server too nonlocal connect_path connect_path = self.path self.send_response(200) self.end_headers() self.close_connection = 0 monkeypatch.setattr(MockRequestHandler, 'do_CONNECT', do_CONNECT, raising=False) get_path = None def do_GET(self): nonlocal get_path get_path = self.path self.send_response(200) self.send_header("Content-Type", 'application/octet-stream') self.send_header("Content-Length", '0') self.end_headers() monkeypatch.setattr(MockRequestHandler, 'do_GET', do_GET) # We don't *actually* want to establish SSL, that'd be # to complex for our mock server monkeypatch.setattr('ssl.match_hostname', lambda x,y: True) conn = HTTPConnection(test_host, test_port, proxy=(http_server.host, http_server.port), ssl_context=FakeSSLContext()) try: > conn.send_request('GET', test_path) test/test_dugong.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dugong/__init__.py:569: in send_request self.timeout) dugong/__init__.py:1495: in eval_coroutine if not next(crt).poll(timeout=timeout): dugong/__init__.py:596: in co_send_request self.connect() dugong/__init__.py:487: in connect eval_coroutine(self._co_tunnel(), self.timeout) dugong/__init__.py:1495: in eval_coroutine if not next(crt).poll(timeout=timeout): dugong/__init__.py:529: in _co_tunnel (status, reason) = yield from self._co_read_status() dugong/__init__.py:908: in _co_read_status line = yield from self._co_readstr_until(b'\r\n', MAX_LINE_SIZE) dugong/__init__.py:1295: in _co_readstr_until res = self._try_fill_buffer() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _try_fill_buffer(self): '''Try to fill up read buffer Returns the number of bytes read into buffer, or `None` if no data was available on the socket. Return zero if the TCP connection has been properly closed but the socket object still exists. On other problems (e.g. if the socket object has been destroyed or the connection interrupted), raise `ConnectionClosed`. ''' log.debug('start') rbuf = self._rbuf # If buffer is empty, reset so that we start filling from beginning if rbuf.b == rbuf.e: rbuf.b = 0 rbuf.e = 0 # There should be free capacity assert rbuf.e < len(rbuf.d) if self._sock is None: raise ConnectionClosed('connection has been closed locally') try: len_ = self._sock.recv_into(memoryview(rbuf.d)[rbuf.e:]) except (socket.timeout, ssl.SSLWantReadError, BlockingIOError): log.debug('done (nothing ready)') return None except (ConnectionResetError, BrokenPipeError): > raise ConnectionClosed('connection was interrupted') E dugong.ConnectionClosed: connection was interrupted dugong/__init__.py:1348: ConnectionClosed =============================== warnings summary =============================== test/test_dugong.py:182 /var/tmp/portage/dev-python/dugong-3.7.3/work/dugong-3.7.3/test/test_dugong.py:182: PytestUnknownMarkWarning: Unknown pytest.mark.no_ssl - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html @pytest.mark.no_ssl test/test_dugong.py:231 /var/tmp/portage/dev-python/dugong-3.7.3/work/dugong-3.7.3/test/test_dugong.py:231: PytestUnknownMarkWarning: Unknown pytest.mark.no_ssl - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html @pytest.mark.no_ssl test/test_dugong.py:587 /var/tmp/portage/dev-python/dugong-3.7.3/work/dugong-3.7.3/test/test_dugong.py:587: PytestUnknownMarkWarning: Unknown pytest.mark.no_ssl - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html @pytest.mark.no_ssl test/test_dugong.py:605 /var/tmp/portage/dev-python/dugong-3.7.3/work/dugong-3.7.3/test/test_dugong.py:605: PytestUnknownMarkWarning: Unknown pytest.mark.no_ssl - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html @pytest.mark.no_ssl -- Docs: https://docs.pytest.org/en/latest/warnings.html =========================== short test summary info ============================ FAILED test/test_dugong.py::test_http_proxy[ssl-None] - dugong.ConnectionClos... FAILED test/test_dugong.py::test_http_proxy[ssl-8080] - dugong.ConnectionClos... FAILED test/test_dugong.py::test_connect_proxy[ssl-None] - dugong.ConnectionC... FAILED test/test_dugong.py::test_connect_proxy[ssl-8080] - dugong.ConnectionC... ============ 4 failed, 118 passed, 2 skipped, 4 warnings in 17.46s ============= * ERROR: dev-python/dugong-3.7.3::gentoo failed (test phase): * Tests failed under python3.7 * * Call stack: * ebuild.sh, line 125: Called src_test * environment, line 3790: Called distutils-r1_src_test * environment, line 1237: Called _distutils-r1_run_foreach_impl 'python_test' * environment, line 369: Called python_foreach_impl 'distutils-r1_run_phase' 'python_test' * environment, line 3399: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' * environment, line 2705: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' * environment, line 2703: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test' * environment, line 825: Called distutils-r1_run_phase 'python_test' * environment, line 1174: Called python_test * environment, line 3750: Called die * The specific snippet of code: * py.test -v || die "Tests failed under ${EPYTHON}" * * If you need support, post the output of `emerge --info '=dev-python/dugong-3.7.3::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-python/dugong-3.7.3::gentoo'`. * The complete build log is located at '/var/log/emerge-log/build/dev-python/dugong-3.7.3:20200516-093528.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-python/dugong-3.7.3/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-python/dugong-3.7.3/temp/environment'. * Working directory: '/var/tmp/portage/dev-python/dugong-3.7.3/work/dugong-3.7.3' * S: '/var/tmp/portage/dev-python/dugong-3.7.3/work/dugong-3.7.3' emerge --info: Portage 2.3.99 (python 3.7.7-final-0, default/linux/amd64/17.1, gcc-10.1.0, glibc-2.31-r3, 5.4.0-1009-aws x86_64) ================================================================= System uname: Linux-5.4.0-1009-aws-x86_64-AMD_EPYC_7571-with-gentoo-2.7 KiB Mem: 16011344 total, 8852996 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Mon, 18 May 2020 05:35:19 +0000 sh bash 5.0_p17 ld GNU ld (Gentoo 2.34 p4) 2.34.0 app-shells/bash: 5.0_p17::gentoo dev-lang/perl: 5.30.2::gentoo dev-lang/python: 2.7.18::gentoo, 3.7.7-r2::gentoo, 3.8.3::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.42.1::gentoo sys-apps/sandbox: 2.18::gentoo sys-devel/autoconf: 2.69-r5::gentoo sys-devel/automake: 1.16.2::gentoo sys-devel/binutils: 2.34-r1::gentoo sys-devel/gcc: 10.1.0::gentoo sys-devel/gcc-config: 2.2.1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.6::gentoo (virtual/os-headers) sys-libs/glibc: 2.31-r3::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CC="x86_64-pc-linux-gnu-gcc" CFLAGS="-O2 -pipe -march=native -frecord-gcc-switches" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXX="x86_64-pc-linux-gnu-g++" CXXFLAGS="-O2 -pipe -march=native -frecord-gcc-switches" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps=y --binpkg-respect-use=y -1 -b -k" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe -march=native -frecord-gcc-switches" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms sign split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=native -frecord-gcc-switches" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="C.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0" MAKEOPTS="-j4" PKGDIR="/root/.packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="acl amd64 berkdb bzip2 cli crypt dri fortran gdbm iconv ipv6 libtirpc multilib ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl tcpd unicode xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS