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

Unified Diff: build/android/pylib/base/test_dispatcher_unittest.py

Issue 453953003: Provide a maximum size on the number of tests to run in one group. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only try to split strings Created 6 years, 4 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 | « build/android/pylib/base/test_dispatcher.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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."""
« no previous file with comments | « build/android/pylib/base/test_dispatcher.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698