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

Side by Side Diff: build/android/pylib/base/test_dispatcher_unittest.py

Issue 1314313004: [Android][telemetry] Update pylib imports for modules that moved into devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Unittests for test_dispatcher.py.""" 6 """Unittests for test_dispatcher.py."""
7 # pylint: disable=R0201 7 # pylint: disable=R0201
8 # pylint: disable=W0212 8 # pylint: disable=W0212
9 9
10 import os 10 import os
11 import sys 11 import sys
12 import unittest 12 import unittest
13 13
14 14
15 from devil.android import device_utils
16 from devil.android.sdk import adb_wrapper
17 from devil.utils import watchdog_timer
15 from pylib import constants 18 from pylib import constants
16 from pylib.base import base_test_result 19 from pylib.base import base_test_result
17 from pylib.base import test_collection 20 from pylib.base import test_collection
18 from pylib.base import test_dispatcher 21 from pylib.base import test_dispatcher
19 from pylib.device import adb_wrapper
20 from pylib.device import device_utils
21 from pylib.utils import watchdog_timer
22 22
23 sys.path.append( 23 sys.path.append(
24 os.path.join(constants.DIR_SOURCE_ROOT, 'third_party', 'pymock')) 24 os.path.join(constants.DIR_SOURCE_ROOT, 'third_party', 'pymock'))
25 import mock 25 import mock
26 26
27 27
28 class TestException(Exception): 28 class TestException(Exception):
29 pass 29 pass
30 30
31 31
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 def testNoTests(self): 233 def testNoTests(self):
234 results, exit_code = test_dispatcher.RunTests( 234 results, exit_code = test_dispatcher.RunTests(
235 [], MockRunner, [_MockDevice('0'), _MockDevice('1')], shard=False) 235 [], MockRunner, [_MockDevice('0'), _MockDevice('1')], shard=False)
236 self.assertEqual(len(results.GetAll()), 0) 236 self.assertEqual(len(results.GetAll()), 0)
237 self.assertEqual(exit_code, constants.ERROR_EXIT_CODE) 237 self.assertEqual(exit_code, constants.ERROR_EXIT_CODE)
238 238
239 239
240 if __name__ == '__main__': 240 if __name__ == '__main__':
241 unittest.main() 241 unittest.main()
OLDNEW
« no previous file with comments | « build/android/pylib/base/test_dispatcher.py ('k') | build/android/pylib/chrome_test_server_spawner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698