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

Side by Side Diff: client/tests/run_isolated_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, 5 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/run_isolated_smoke_test.py ('k') | client/tests/swarming_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 2013 The LUCI Authors. All rights reserved. 2 # Copyright 2013 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 # pylint: disable=R0201 6 # pylint: disable=R0201
7 7
8 import StringIO 8 import StringIO
9 import base64 9 import base64
10 import functools 10 import functools
11 import json 11 import json
12 import logging 12 import logging
13 import os 13 import os
14 import sys 14 import sys
15 import tempfile 15 import tempfile
16 import unittest 16 import unittest
17 17
18 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 18 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(
19 __file__.decode(sys.getfilesystemencoding()))))
19 sys.path.insert(0, ROOT_DIR) 20 sys.path.insert(0, ROOT_DIR)
20 sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party')) 21 sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party'))
21 22
22 import cipd 23 import cipd
23 import isolated_format 24 import isolated_format
24 import isolateserver 25 import isolateserver
25 import run_isolated 26 import run_isolated
26 from depot_tools import auto_stub 27 from depot_tools import auto_stub
27 from depot_tools import fix_encoding 28 from depot_tools import fix_encoding
28 from utils import file_path 29 from utils import file_path
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 self.assertEqual(expected, actual) 634 self.assertEqual(expected, actual)
634 635
635 636
636 if __name__ == '__main__': 637 if __name__ == '__main__':
637 fix_encoding.fix_encoding() 638 fix_encoding.fix_encoding()
638 if '-v' in sys.argv: 639 if '-v' in sys.argv:
639 unittest.TestCase.maxDiff = None 640 unittest.TestCase.maxDiff = None
640 logging.basicConfig( 641 logging.basicConfig(
641 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR) 642 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR)
642 unittest.main() 643 unittest.main()
OLDNEW
« no previous file with comments | « client/tests/run_isolated_smoke_test.py ('k') | client/tests/swarming_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698