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

Side by Side Diff: appengine/swarming/swarming_bot/bot_main_test.py

Issue 1233303003: Migrate and merge logging_utils from swarming_bot into client/utils. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Created 5 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Swarming Authors. All rights reserved. 2 # Copyright 2013 The Swarming Authors. All rights reserved.
3 # Use of this source code is governed by the Apache v2.0 license that can be 3 # Use of this source code is governed by the Apache v2.0 license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import logging 6 import logging
7 import os 7 import os
8 import shutil 8 import shutil
9 import subprocess 9 import subprocess
10 import sys 10 import sys
11 import tempfile 11 import tempfile
12 import time 12 import time
13 import unittest 13 import unittest
14 14
15 THIS_FILE = os.path.abspath(__file__) 15 THIS_FILE = os.path.abspath(__file__)
16 16
17 import test_env 17 import test_env
18 test_env.setup_test_env() 18 test_env.setup_test_env()
19 19
20 # Creates a server mock for functions in net.py. 20 # Creates a server mock for functions in net.py.
21 import net_utils 21 import net_utils
22 22
23 from utils import logging_utils
23 from utils import net 24 from utils import net
24 from utils import zip_package 25 from utils import zip_package
25 import bot 26 import bot
26 import bot_config 27 import bot_config
27 import bot_main 28 import bot_main
28 import logging_utils
29 import os_utilities 29 import os_utilities
30 import xsrf_client 30 import xsrf_client
31 31
32 32
33 # Access to a protected member XX of a client class - pylint: disable=W0212 33 # Access to a protected member XX of a client class - pylint: disable=W0212
34 34
35 35
36 class TestBotMain(net_utils.TestCase): 36 class TestBotMain(net_utils.TestCase):
37 def setUp(self): 37 def setUp(self):
38 super(TestBotMain, self).setUp() 38 super(TestBotMain, self).setUp()
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 476
477 self.assertEqual(0, bot_main.main([])) 477 self.assertEqual(0, bot_main.main([]))
478 478
479 479
480 if __name__ == '__main__': 480 if __name__ == '__main__':
481 if '-v' in sys.argv: 481 if '-v' in sys.argv:
482 unittest.TestCase.maxDiff = None 482 unittest.TestCase.maxDiff = None
483 logging.basicConfig( 483 logging.basicConfig(
484 level=logging.DEBUG if '-v' in sys.argv else logging.CRITICAL) 484 level=logging.DEBUG if '-v' in sys.argv else logging.CRITICAL)
485 unittest.main() 485 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698