@@ -955,8 +955,14 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
955955 def test_proxy_environment_variables (self , monkeypatch : pytest .MonkeyPatch ) -> None :
956956 # Test that the proxy environment variables are set correctly
957957 monkeypatch .setenv ("HTTPS_PROXY" , "https://example.org" )
958- # Delete in case our environment has this set
958+ # Delete in case our environment has any proxy env vars set
959959 monkeypatch .delenv ("HTTP_PROXY" , raising = False )
960+ monkeypatch .delenv ("ALL_PROXY" , raising = False )
961+ monkeypatch .delenv ("NO_PROXY" , raising = False )
962+ monkeypatch .delenv ("http_proxy" , raising = False )
963+ monkeypatch .delenv ("https_proxy" , raising = False )
964+ monkeypatch .delenv ("all_proxy" , raising = False )
965+ monkeypatch .delenv ("no_proxy" , raising = False )
960966
961967 client = DefaultHttpxClient ()
962968
@@ -1914,8 +1920,14 @@ async def test_main() -> None:
19141920 async def test_proxy_environment_variables (self , monkeypatch : pytest .MonkeyPatch ) -> None :
19151921 # Test that the proxy environment variables are set correctly
19161922 monkeypatch .setenv ("HTTPS_PROXY" , "https://example.org" )
1917- # Delete in case our environment has this set
1923+ # Delete in case our environment has any proxy env vars set
19181924 monkeypatch .delenv ("HTTP_PROXY" , raising = False )
1925+ monkeypatch .delenv ("ALL_PROXY" , raising = False )
1926+ monkeypatch .delenv ("NO_PROXY" , raising = False )
1927+ monkeypatch .delenv ("http_proxy" , raising = False )
1928+ monkeypatch .delenv ("https_proxy" , raising = False )
1929+ monkeypatch .delenv ("all_proxy" , raising = False )
1930+ monkeypatch .delenv ("no_proxy" , raising = False )
19191931
19201932 client = DefaultAsyncHttpxClient ()
19211933
0 commit comments