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

Side by Side Diff: client/tests/isolate_test.py

Issue 1390773002: Add an assert to ensure UTF-8 locale when handling file paths. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: More fixes Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « client/tests/isolate_smoke_test.py ('k') | client/tests/isolated_format_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2012 The Swarming Authors. All rights reserved. 2 # Copyright 2012 The Swarming Authors. All rights reserved.
3 # Use of this source code is governed under the Apache License, Version 2.0 that 3 # Use of this source code is governed under the Apache License, Version 2.0 that
4 # can be found in the LICENSE file. 4 # can be found in the LICENSE file.
5 5
6 import cStringIO 6 import cStringIO
7 import hashlib 7 import hashlib
8 import json 8 import json
9 import logging 9 import logging
10 import optparse 10 import optparse
11 import os 11 import os
12 import shutil 12 import shutil
13 import subprocess 13 import subprocess
14 import sys 14 import sys
15 import tempfile 15 import tempfile
16 16
17 ROOT_DIR = unicode(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 17 ROOT_DIR = unicode(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
18 sys.path.insert(0, ROOT_DIR) 18 sys.path.insert(0, ROOT_DIR)
19 sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party')) 19 sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party'))
20 20
21 from depot_tools import auto_stub 21 from depot_tools import auto_stub
22 from depot_tools import fix_encoding
22 import auth 23 import auth
23 import isolate 24 import isolate
24 import isolate_format 25 import isolate_format
25 import isolated_format 26 import isolated_format
26 import isolateserver 27 import isolateserver
27 from utils import file_path 28 from utils import file_path
28 from utils import logging_utils 29 from utils import logging_utils
29 from utils import tools 30 from utils import tools
30 import test_utils 31 import test_utils
31 32
(...skipping 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1612 cmd = ['run', '--isolate', isolate_file] 1613 cmd = ['run', '--isolate', isolate_file]
1613 self.assertEqual(0, isolate.CMDrun(optparse.OptionParser(), cmd)) 1614 self.assertEqual(0, isolate.CMDrun(optparse.OptionParser(), cmd))
1614 1615
1615 1616
1616 def clear_env_vars(): 1617 def clear_env_vars():
1617 for e in ('ISOLATE_DEBUG', 'ISOLATE_SERVER'): 1618 for e in ('ISOLATE_DEBUG', 'ISOLATE_SERVER'):
1618 os.environ.pop(e, None) 1619 os.environ.pop(e, None)
1619 1620
1620 1621
1621 if __name__ == '__main__': 1622 if __name__ == '__main__':
1623 fix_encoding.fix_encoding()
1622 clear_env_vars() 1624 clear_env_vars()
1623 test_utils.main() 1625 test_utils.main()
OLDNEW
« no previous file with comments | « client/tests/isolate_smoke_test.py ('k') | client/tests/isolated_format_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698