Question about --skip-env-install #3956
|
Hi ! I'm trying to set up tox so that I can run the tests when I'm offline (and also avoid re-downloading all dependencies each time I run the command). I discovered the option For testing, I added Just to be sure, when I remove the option, the tests are indeed failling : Is there something I got wrong ? Thanks !! |
Replies: 1 comment
|
Hi! This is working as documented — Note that by default tox 4 does not recreate the environment or re-download dependencies on every run — environments are reused and If you want to skip even that, use an editable install so the environment points directly at your source tree: [testenv]
package = editableWith that, source changes are picked up without any reinstall, and you can combine it with |
Hi! This is working as documented —
--skip-env-installskips both dependency installation and building/installing your package (it is a superset of--skip-pkg-install), so your tests ran against the previously installed wheel, which is why theassert Falsewas not seen.Note that by default tox 4 does not recreate the environment or re-download dependencies on every run — environments are reused and
depsare only reinstalled when their configuration changes. The only per-run cost is rebuilding and reinstalling your package, which is what makes your code changes visible.If you want to skip even that, use an editable install so the environment points directly at your source tree: