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

Unified Diff: appengine/swarming/swarming_bot/main_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 | « appengine/swarming/swarming_bot/bot_code/task_runner_test.py ('k') | appengine/swarming/tools/start_bot.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/swarming_bot/main_test.py
diff --git a/appengine/swarming/swarming_bot/main_test.py b/appengine/swarming/swarming_bot/main_test.py
index e5d7a0e68b6ec98107537277410ea8c67401dcc9..d0837e61da93a750da52c8da52b02da885a12857 100755
--- a/appengine/swarming/swarming_bot/main_test.py
+++ b/appengine/swarming/swarming_bot/main_test.py
@@ -6,7 +6,6 @@
import json
import os
import re
-import shutil
import sys
import tempfile
import unittest
@@ -21,6 +20,8 @@ from utils import subprocess42
import fake_swarming
from bot_code import bot_main
from depot_tools import auto_stub
+from depot_tools import fix_encoding
+from utils import file_path
class TestCase(auto_stub.TestCase):
@@ -34,7 +35,7 @@ class TestCase(auto_stub.TestCase):
def tearDown(self):
try:
- shutil.rmtree(self._tmpdir)
+ file_path.rmtree(self._tmpdir)
finally:
super(TestCase, self).tearDown()
@@ -119,6 +120,7 @@ class MainTest(TestCase):
if __name__ == '__main__':
+ fix_encoding.fix_encoding()
if '-v' in sys.argv:
unittest.TestCase.maxDiff = None
unittest.main()
« no previous file with comments | « appengine/swarming/swarming_bot/bot_code/task_runner_test.py ('k') | appengine/swarming/tools/start_bot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698