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

Unified Diff: client/tests/run_isolated_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/tests/run_isolated_smoke_test.py ('k') | client/tests/swarming_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/run_isolated_test.py
diff --git a/client/tests/run_isolated_test.py b/client/tests/run_isolated_test.py
index 9cb39d10210b0abd09df99a5fe3ab6ddce9de4d9..58e76478819fd6c345c16838862cbc19a422aaac 100755
--- a/client/tests/run_isolated_test.py
+++ b/client/tests/run_isolated_test.py
@@ -10,7 +10,6 @@ import functools
import json
import logging
import os
-import shutil
import sys
import tempfile
import unittest
@@ -23,6 +22,7 @@ import isolated_format
import isolateserver
import run_isolated
from depot_tools import auto_stub
+from depot_tools import fix_encoding
from utils import file_path
from utils import logging_utils
from utils import on_error
@@ -82,7 +82,7 @@ class RunIsolatedTestBase(auto_stub.TestCase):
file_path.set_read_only(os.path.join(dirpath, filename), False)
for dirname in dirnames:
file_path.set_read_only(os.path.join(dirpath, dirname), False)
- shutil.rmtree(self.tempdir)
+ file_path.rmtree(self.tempdir)
super(RunIsolatedTestBase, self).tearDown()
@property
@@ -477,6 +477,7 @@ class RunIsolatedJsonTest(RunIsolatedTestBase):
if __name__ == '__main__':
+ fix_encoding.fix_encoding()
logging.basicConfig(
level=logging.DEBUG if '-v' in sys.argv else logging.ERROR)
unittest.main()
« no previous file with comments | « client/tests/run_isolated_smoke_test.py ('k') | client/tests/swarming_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698