[pitivi: 9/9] tests: Specify encoding in locale.



commit 4b32cd9c83fd3f963d9f209d63468e60245e2024
Author: Brady J. Garvin <bgarvin cse unl edu>
Date:   Wed Jan 22 14:10:56 2020 -0600

    tests: Specify encoding in locale.
    
    On some systems, `local.setlocale` cannot be called with just a
    language code; an encoding must be specified also.  (See the
    documentation at
    https://docs.python.org/3/library/locale.html#locale.setlocale.)
    
    This change specifies an encoding for the locale used in testing,
    which prevents exceptions from being thrown on such systems.

 tests/common.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/common.py b/tests/common.py
index f45a14d5..c17511a9 100644
--- a/tests/common.py
+++ b/tests/common.py
@@ -71,7 +71,7 @@ for category in ["Gtk", "Gdk", "GLib-GObject", "GES"]:
 
 detect_leaks = os.environ.get("PITIVI_TEST_DETECT_LEAKS", "0") not in ("0", "")
 os.environ["PITIVI_USER_CACHE_DIR"] = tempfile.mkdtemp(suffix="pitiviTestsuite")
-locale.setlocale(locale.LC_ALL, "en_US")
+locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
 
 
 def __create_settings(proxying_strategy=ProxyingStrategy.NOTHING,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]