From 4f5d7ccc6a082dbc3ce0b87b3c34fb9ec98f4301 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Tue, 12 Jan 2021 17:35:17 +0100 Subject: [PATCH] tests: Don't use proxy when testing connection to ::1 Forwarded: https://github.com/pycurl/pycurl/pull/668 The environment where the test is run may not disable proxy for ::1, which is the case in Ubuntu CI due to older releases not handling ::1 in no_proxy properly. https://bugs.launchpad.net/ubuntu/+source/curl/+bug/1908136 --- tests/open_socket_cb_test.py | 1 + 1 file changed, 1 insertion(+) --- a/tests/open_socket_cb_test.py +++ b/tests/open_socket_cb_test.py @@ -46,6 +46,7 @@ def test_socket_open_ipv6(curl, app): curl.setopt(pycurl.OPENSOCKETFUNCTION, on_open) curl.setopt(curl.URL, f"{app.replace('127.0.0.1', '[::1]')}/success") + curl.setopt(curl.NOPROXY, '::1') sio = BytesIO() curl.setopt(pycurl.WRITEFUNCTION, sio.write) with pytest.raises(pycurl.error):