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

Unified Diff: client/tests/on_error_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/tests/net_utils.py ('k') | client/tests/run_isolated_smoke_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/on_error_test.py
diff --git a/client/tests/on_error_test.py b/client/tests/on_error_test.py
index 7b03c04460b1156ed422d55b4af4fcc15be3f16f..d52a13ad6b97a6763f1b408e0256fdcc2889c5b5 100755
--- a/client/tests/on_error_test.py
+++ b/client/tests/on_error_test.py
@@ -21,12 +21,15 @@ import unittest
import urllib
import urlparse
-TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
+TESTS_DIR = os.path.dirname(os.path.abspath(
+ __file__.decode(sys.getfilesystemencoding())))
ROOT_DIR = os.path.dirname(TESTS_DIR)
sys.path.insert(0, ROOT_DIR)
sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party'))
from depot_tools import auto_stub
+from depot_tools import fix_encoding
+
from utils import on_error
@@ -407,6 +410,8 @@ def run_shell_out(url, mode):
if __name__ == '__main__':
+ fix_encoding.fix_encoding()
+
# Ignore _DISABLE_ENVVAR if set.
os.environ.pop(on_error._DISABLE_ENVVAR, None)
« no previous file with comments | « client/tests/net_utils.py ('k') | client/tests/run_isolated_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698