adrienverge / yamllint

A linter for YAML files.
GNU General Public License v3.0
2.9k stars 278 forks source link

Environment variable-related test fixes #623

Closed Jayman2000 closed 10 months ago

Jayman2000 commented 11 months ago

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 just test_run_with_user_global_config_file.

Fixes #605. Fixes #621.

coveralls commented 11 months ago

Coverage Status

coverage: 99.822% (+0.4%) from 99.415% when pulling 9679651544720fe9f2b1773da43735eece091b78 on Jayman2000:fix-env-interference into 152ba20f339588a872777eafb888f0073e83cafb on adrienverge:master.