Chromium Code Reviews| 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 88dfda69f01939a1253b8b7739a3207cf3dadcc2..c2a800925d78ddeff89dc40841b10e55248c745d 100644 |
| --- a/build/android/pylib/base/test_dispatcher_unittest.py |
| +++ b/build/android/pylib/base/test_dispatcher_unittest.py |
| @@ -186,6 +186,14 @@ 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 |
|
craigdh
2013/08/27 19:28:57
need an extra line here
|
| class TestReplicate(unittest.TestCase): |
| """Tests test_dispatcher.RunTests with replication.""" |