Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1763)

Unified Diff: tests/gclient_utils_test.py

Issue 3192001: Force LANGUAGE=en to fix svn output parsing (Closed)
Patch Set: fix unit tests Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gclient_utils.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gclient_utils_test.py
diff --git a/tests/gclient_utils_test.py b/tests/gclient_utils_test.py
index 6bcfd130563554b806b5b16f4a59423adf989d5f..01b22210714b9e689827c6d07b63ff891637b919 100755
--- a/tests/gclient_utils_test.py
+++ b/tests/gclient_utils_test.py
@@ -40,9 +40,12 @@ class CheckCallTestCase(GclientUtilBase):
command = ['boo', 'foo', 'bar']
process = self.mox.CreateMockAnything()
process.returncode = 0
+ env = gclient_utils.os.environ.copy()
+ env['LANGUAGE'] = 'en'
gclient_utils.subprocess.Popen(
command, cwd=None,
stderr=None,
+ env=env,
stdout=gclient_utils.subprocess.PIPE,
shell=gclient_utils.sys.platform.startswith('win')).AndReturn(process)
process.communicate().AndReturn(['bleh', 'foo'])
@@ -53,9 +56,12 @@ class CheckCallTestCase(GclientUtilBase):
command = ['boo', 'foo', 'bar']
process = self.mox.CreateMockAnything()
process.returncode = 42
+ env = gclient_utils.os.environ.copy()
+ env['LANGUAGE'] = 'en'
gclient_utils.subprocess.Popen(
command, cwd=None,
stderr=None,
+ env=env,
stdout=gclient_utils.subprocess.PIPE,
shell=gclient_utils.sys.platform.startswith('win')).AndReturn(process)
process.communicate().AndReturn(['bleh', 'foo'])
@@ -78,6 +84,8 @@ class SubprocessCallAndFilterTestCase(GclientUtilBase):
fail_status = None
pattern = 'a(.*)b'
test_string = 'ahah\naccb\nallo\naddb\n'
+ env = gclient_utils.os.environ.copy()
+ env['LANGUAGE'] = 'en'
class Mock(object):
stdout = StringIO.StringIO(test_string)
def wait(self):
@@ -89,6 +97,7 @@ class SubprocessCallAndFilterTestCase(GclientUtilBase):
gclient_utils.subprocess.Popen(
command, bufsize=0, cwd=in_directory,
shell=(gclient_utils.sys.platform == 'win32'),
+ env=env,
stdout=gclient_utils.subprocess.PIPE,
stderr=gclient_utils.subprocess.STDOUT).AndReturn(kid)
self.mox.ReplayAll()
« no previous file with comments | « gclient_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698