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

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

Issue 2093593002: luci-py: Making __file__ usage unicode safe. (Closed) Base URL: https://github.com/luci/luci-py.git@master
Patch Set: Small fixes. Created 4 years, 6 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/isolateserver_smoke_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 LUCI Authors. All rights reserved. 2 # Copyright 2012 The LUCI Authors. All rights reserved.
3 # Use of this source code is governed under the Apache License, Version 2.0 3 # Use of this source code is governed under the Apache License, Version 2.0
4 # that can be found in the LICENSE file. 4 # that 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 = os.path.dirname(os.path.dirname(os.path.abspath(
18 __file__.decode(sys.getfilesystemencoding()))))
18 sys.path.insert(0, ROOT_DIR) 19 sys.path.insert(0, ROOT_DIR)
19 sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party')) 20 sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party'))
20 21
21 from depot_tools import auto_stub 22 from depot_tools import auto_stub
22 from depot_tools import fix_encoding 23 from depot_tools import fix_encoding
23 import auth 24 import auth
24 import isolate 25 import isolate
25 import isolate_format 26 import isolate_format
26 import isolated_format 27 import isolated_format
27 import isolateserver 28 import isolateserver
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 1619
1619 def clear_env_vars(): 1620 def clear_env_vars():
1620 for e in ('ISOLATE_DEBUG', 'ISOLATE_SERVER'): 1621 for e in ('ISOLATE_DEBUG', 'ISOLATE_SERVER'):
1621 os.environ.pop(e, None) 1622 os.environ.pop(e, None)
1622 1623
1623 1624
1624 if __name__ == '__main__': 1625 if __name__ == '__main__':
1625 fix_encoding.fix_encoding() 1626 fix_encoding.fix_encoding()
1626 clear_env_vars() 1627 clear_env_vars()
1627 test_utils.main() 1628 test_utils.main()
OLDNEW
« no previous file with comments | « client/tests/isolate_smoke_test.py ('k') | client/tests/isolateserver_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698