Index: build/android/pylib/base/test_dispatcher_unittest.py |
diff --git a/build/android/pylib/base/test_dispatcher_unittest.py b/build/android/pylib/base/test_dispatcher_unittest.py |
index 1206a93cee1394618115ebf014da3ce5e1bc0584..d349f32ab5ad2697256449b2136646e124543ada 100644 |
--- a/build/android/pylib/base/test_dispatcher_unittest.py |
+++ b/build/android/pylib/base/test_dispatcher_unittest.py |
@@ -22,7 +22,6 @@ from pylib.base import test_dispatcher |
from pylib.utils import watchdog_timer |
- |
class TestException(Exception): |
pass |
@@ -120,6 +119,11 @@ class TestFunctions(unittest.TestCase): |
for i in xrange(5): |
self.assertEqual(counter.GetAndIncrement(), i) |
+ def testApplyMaxPerRun(self): |
+ self.assertEqual( |
+ ['A:B', 'C:D', 'E', 'F:G', 'H:I'], |
+ test_dispatcher.ApplyMaxPerRun(['A:B', 'C:D:E', 'F:G:H:I'], 2)) |
+ |
class TestThreadGroupFunctions(unittest.TestCase): |
"""Tests test_dispatcher._RunAllTests and test_dispatcher._CreateRunners.""" |
@@ -188,15 +192,6 @@ class TestShard(unittest.TestCase): |
self.assertEqual(len(results.GetAll()), 0) |
self.assertEqual(exit_code, constants.ERROR_EXIT_CODE) |
- def testTestsRemainWithAllDevicesOffline(self): |
- attached_devices = android_commands.GetAttachedDevices |
- android_commands.GetAttachedDevices = lambda: [] |
- try: |
- with self.assertRaises(AssertionError): |
- _results, _exit_code = TestShard._RunShard(MockRunner) |
- finally: |
- android_commands.GetAttachedDevices = attached_devices |
- |
class TestReplicate(unittest.TestCase): |
"""Tests test_dispatcher.RunTests with replication.""" |