[3.11] gh-109989: Fix test_c_locale_coercion when PYTHONIOENCODING is set (GH-113378) (#113399)
gh-109989: Fix test_c_locale_coercion when PYTHONIOENCODING is set (GH-113378)
* gh-109989: Fix test_c_locale_coercion when PYTHONIOENCODING is set
This fixes the existing tests when PYTHONIOENCODING is
set by unsetting PYTHONIOENCODING.
Also add a test that explicitly checks what happens
when PYTHONIOENCODING is set.
(cherry picked from commit
5f665e99e0b8a52415f83c2416eaf28abaacc3ae)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>