From 7d502dd410ec43b1477adbe92371a9985c922848 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 23 Sep 2019 20:26:34 +1000 Subject: [PATCH] Cleanup by resetting locale --- Tests/test_locale.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tests/test_locale.py b/Tests/test_locale.py index 86229dbcb..cbec8b965 100644 --- a/Tests/test_locale.py +++ b/Tests/test_locale.py @@ -31,4 +31,8 @@ class TestLocale(PillowTestCase): locale.setlocale(locale.LC_ALL, "polish") except locale.Error: unittest.skip("Polish locale not available") - Image.open(path) + + try: + Image.open(path) + finally: + locale.setlocale(locale.LC_ALL, (None, None))