summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-05-10 20:19:05 +0200
committerAllan McRae <allan@archlinux.org>2013-05-29 06:08:02 +0200
commit296e630edd129989856b1ebfaa7e8497a90bc937 (patch)
treecb6890275ec5a446d2e649c450f458e980072bf0 /test
parent84ac55b0529b6489da38ebfc56a988228aa4859a (diff)
downloadpacman-296e630edd129989856b1ebfaa7e8497a90bc937.tar.gz
pacman-296e630edd129989856b1ebfaa7e8497a90bc937.tar.xz
pmtest: set LC_ALL=C in subprocess.call
LC_ALL=C is required to force pacman's output to English for tests that rely on that output, but setting it in Makefile.am results in those tests breaking under different locales when pactest.py is run directly. This will also ease an eventual transition to python3 which LC_ALL=C causes to default to ascii encoded strings, creating problems for tests with unicode strings. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test')
-rw-r--r--test/pacman/pmtest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
index 2eafe682..f5a96805 100644
--- a/test/pacman/pmtest.py
+++ b/test/pacman/pmtest.py
@@ -241,7 +241,7 @@ class pmtest(object):
# archives are made available more easily.
time_start = time.time()
self.retcode = subprocess.call(cmd, stdout=output, stderr=output,
- cwd=os.path.join(self.root, util.TMPDIR))
+ cwd=os.path.join(self.root, util.TMPDIR), env={'LC_ALL': 'C'})
time_end = time.time()
vprint("\ttime elapsed: %.2fs" % (time_end - time_start))