fix PYTHONWARNINGS handling to not modify the original env value and improve
its tests
2 files changed