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

Side by Side Diff: build/android/devil/utils/timeout_retry_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 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Unittests for timeout_and_retry.py.""" 5 """Unittests for timeout_and_retry.py."""
6 6
7 import unittest 7 import unittest
8 8
9 from pylib.utils import reraiser_thread 9 from devil.utils import reraiser_thread
10 from pylib.utils import timeout_retry 10 from devil.utils import timeout_retry
11 11
12 12
13 class TestException(Exception): 13 class TestException(Exception):
14 pass 14 pass
15 15
16 16
17 def _NeverEnding(tries): 17 def _NeverEnding(tries):
18 tries[0] += 1 18 tries[0] += 1
19 while True: 19 while True:
20 pass 20 pass
(...skipping 22 matching lines...) Expand all
43 self.assertRaises(TestException, 43 self.assertRaises(TestException,
44 timeout_retry.Run, lambda: _CountTries(tries), 30, 3) 44 timeout_retry.Run, lambda: _CountTries(tries), 30, 3)
45 self.assertEqual(tries[0], 4) 45 self.assertEqual(tries[0], 4)
46 46
47 def testReturnValue(self): 47 def testReturnValue(self):
48 self.assertTrue(timeout_retry.Run(lambda: True, 30, 3)) 48 self.assertTrue(timeout_retry.Run(lambda: True, 30, 3))
49 49
50 50
51 if __name__ == '__main__': 51 if __name__ == '__main__':
52 unittest.main() 52 unittest.main()
OLDNEW
« no previous file with comments | « build/android/devil/utils/reraiser_thread_unittest.py ('k') | build/android/emma_coverage_stats.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698