A CI job can pass its proxy environment into tox without modifying the checked-out tox.ini. For tox 4’s INI configuration:

tox --override 'testenv.pass_env+=HTTP_PROXY,HTTPS_PROXY,NO_PROXY' -e py

The += form appends to the existing pass_env list. Plain = replaces that configured list. The variables must already exist in the environment launching tox; the override supplies names, not proxy values.

The corresponding transient environment input is:

TOX_OVERRIDE='testenv.pass_env+=HTTP_PROXY,HTTPS_PROXY,NO_PROXY' tox -e py

These examples use POSIX shell quoting. tox treats the pass_env names case-insensitively, so the selected names also match lowercase variants.

For tox’s native TOML configuration, the base run-environment table is env_run_base rather than testenv. Use the path matching the actual configuration format.

This configures test run environments. A separate packaging environment can need its own forwarding policy. Likewise, compare the downloader's actual inputs; the client still decides whether to honor the variables it receives. A one-run override avoids leaving a CI-specific rewrite in the repository, but does not replace the intended project policy when every run needs the route.

متعلقہ مضامین