From c4f6688ffdd937e6c93dad3f833bd0912679c9fc Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Sat, 9 Jan 2021 12:01:09 +0100 Subject: [PATCH] meta: Add locale to the environment when running tests Click seems particularly upset if the locale is not UTF-8 --- .ci/test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.ci/test.py b/.ci/test.py index 48b63a59..26f74fc4 100644 --- a/.ci/test.py +++ b/.ci/test.py @@ -101,10 +101,14 @@ def run_one(p: Plugin) -> bool: print("Running tests") try: - env = env={ + env = os.environ.copy() + env.update({ # Need to customize PATH so lightningd can find the correct python3 'PATH': "{}:{}".format(bin_path, os.environ['PATH']), - } + # Some plugins require a valid locale to be set + 'LC_ALL': 'C.UTF-8', + 'LANG': 'C.UTF-8', + }) subprocess.check_call( [ pytest_path,