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

Side by Side Diff: build/android/devil/utils/reraiser_thread_unittest.py

Issue 1315743004: [Android] Add a custom pylintrc for build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix appurify_sanitized import-errors 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
« no previous file with comments | « build/android/devil/utils/lsusb.py ('k') | build/android/devil/utils/reset_usb.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 reraiser_thread.py.""" 5 """Unittests for reraiser_thread.py."""
6 6
7 import threading 7 import threading
8 import unittest 8 import unittest
9 9
10 from devil.utils import reraiser_thread 10 from devil.utils import reraiser_thread
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 event.set() 92 event.set()
93 93
94 94
95 class TestRunAsync(unittest.TestCase): 95 class TestRunAsync(unittest.TestCase):
96 """Tests for reraiser_thread.RunAsync.""" 96 """Tests for reraiser_thread.RunAsync."""
97 def testNoArgs(self): 97 def testNoArgs(self):
98 results = reraiser_thread.RunAsync([]) 98 results = reraiser_thread.RunAsync([])
99 self.assertEqual([], results) 99 self.assertEqual([], results)
100 100
101 def testOneArg(self): 101 def testOneArg(self):
102 results = reraiser_thread.RunAsync([lambda:1]) 102 results = reraiser_thread.RunAsync([lambda: 1])
103 self.assertEqual([1], results) 103 self.assertEqual([1], results)
104 104
105 def testTwoArgs(self): 105 def testTwoArgs(self):
106 a, b = reraiser_thread.RunAsync((lambda:1, lambda:2)) 106 a, b = reraiser_thread.RunAsync((lambda: 1, lambda: 2))
107 self.assertEqual(1, a) 107 self.assertEqual(1, a)
108 self.assertEqual(2, b) 108 self.assertEqual(2, b)
109 109
110 if __name__ == '__main__': 110 if __name__ == '__main__':
111 unittest.main() 111 unittest.main()
OLDNEW
« no previous file with comments | « build/android/devil/utils/lsusb.py ('k') | build/android/devil/utils/reset_usb.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698