From 320e00276fa7f3cee2af6992f863f36a5b855d3d Mon Sep 17 00:00:00 2001
From: Michael Kuhn <michael@ikkoku.de>
Date: Fri, 5 Apr 2019 20:26:40 +0200
Subject: [PATCH] Fix module_parsing test (#11087)

The module_parsing test checks whether the module function is available
by looking for the string 'not found'. If the user has set a different
locale, the test can assume that the module function is available when
it actually is not.
---
 lib/spack/spack/test/module_parsing.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/spack/spack/test/module_parsing.py b/lib/spack/spack/test/module_parsing.py
index 1e1c3a993b..fc8111408f 100644
--- a/lib/spack/spack/test/module_parsing.py
+++ b/lib/spack/spack/test/module_parsing.py
@@ -15,7 +15,10 @@
     ModuleError)
 
 
+env = os.environ.copy()
+env['LC_ALL'] = 'C'
 typeset_func = subprocess.Popen('module avail',
+                                env=env,
                                 stdout=subprocess.PIPE,
                                 stderr=subprocess.PIPE,
                                 shell=True)
-- 
GitLab