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

Unified Diff: appengine/swarming/swarming_bot/bot_code/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
Index: appengine/swarming/swarming_bot/bot_code/bot_main_test.py
diff --git a/appengine/swarming/swarming_bot/bot_code/bot_main_test.py b/appengine/swarming/swarming_bot/bot_code/bot_main_test.py
index 644b6e7009307321069a35cf3853df0280e3fd46..45a2fb095c6f9478bd2f0c946df88e196d7d0bf2 100755
--- a/appengine/swarming/swarming_bot/bot_code/bot_main_test.py
+++ b/appengine/swarming/swarming_bot/bot_code/bot_main_test.py
@@ -23,6 +23,8 @@ import bot_main
import xsrf_client
from api import bot
from api import os_utilities
+from depot_tools import fix_encoding
+from utils import file_path
from utils import logging_utils
from utils import net
from utils import subprocess42
@@ -74,7 +76,7 @@ class TestBotMain(net_utils.TestCase):
def tearDown(self):
os.environ.pop('SWARMING_BOT_ID', None)
os.chdir(self.old_cwd)
- shutil.rmtree(self.root_dir)
+ file_path.rmtree(self.root_dir)
super(TestBotMain, self).tearDown()
def test_get_dimensions(self):
@@ -529,6 +531,7 @@ class TestBotMain(net_utils.TestCase):
if __name__ == '__main__':
+ fix_encoding.fix_encoding()
if '-v' in sys.argv:
unittest.TestCase.maxDiff = None
logging.basicConfig(
« no previous file with comments | « appengine/swarming/server/bot_code_test.py ('k') | appengine/swarming/swarming_bot/bot_code/task_runner_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698