While I was working on implementing what was discussed here, I realized that there were other edge cases where environment variables could cause problems. For example, running YAMLLINT_CONFIG_FILE=/random/binary/file python -m pytest discover caused a bunch of new test failures. I decided to implement a more robust solution that fixes the problem for more than just test_run_with_user_global_config_file.
coverage: 99.822% (+0.4%) from 99.415%
when pulling 9679651544720fe9f2b1773da43735eece091b78 on Jayman2000:fix-env-interference
into 152ba20f339588a872777eafb888f0073e83cafb on adrienverge:master.
See the individual commits for details.
While I was working on implementing what was discussed here, I realized that there were other edge cases where environment variables could cause problems. For example, running
YAMLLINT_CONFIG_FILE=/random/binary/file python -m pytest discover
caused a bunch of new test failures. I decided to implement a more robust solution that fixes the problem for more than justtest_run_with_user_global_config_file
.Fixes #605. Fixes #621.