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

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

Issue 1314913009: [Android] Move some pylib modules into devil/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/mock_calls.py ('k') | build/android/devil/utils/parallelizer.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ 6 """
7 Unit tests for the contents of mock_calls.py. 7 Unit tests for the contents of mock_calls.py.
8 """ 8 """
9 9
10 import logging 10 import logging
11 import os 11 import os
12 import sys 12 import sys
13 import unittest 13 import unittest
14 14
15 from devil.utils import mock_calls
15 from pylib import constants 16 from pylib import constants
16 from pylib.utils import mock_calls
17 17
18 sys.path.append(os.path.join( 18 sys.path.append(os.path.join(
19 constants.DIR_SOURCE_ROOT, 'third_party', 'pymock')) 19 constants.DIR_SOURCE_ROOT, 'third_party', 'pymock'))
20 import mock # pylint: disable=F0401 20 import mock # pylint: disable=F0401
21 21
22 22
23 class _DummyAdb(object): 23 class _DummyAdb(object):
24 def __str__(self): 24 def __str__(self):
25 return '0123456789abcdef' 25 return '0123456789abcdef'
26 26
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 self.watchMethodCalls(self.call.adb) 166 self.watchMethodCalls(self.call.adb)
167 with self.assertRaises(AssertionError): 167 with self.assertRaises(AssertionError):
168 with self.assertCalls(): 168 with self.assertCalls():
169 self.adb.IsOnline() 169 self.adb.IsOnline()
170 170
171 171
172 if __name__ == '__main__': 172 if __name__ == '__main__':
173 logging.getLogger().setLevel(logging.DEBUG) 173 logging.getLogger().setLevel(logging.DEBUG)
174 unittest.main(verbosity=2) 174 unittest.main(verbosity=2)
175 175
OLDNEW
« no previous file with comments | « build/android/devil/utils/mock_calls.py ('k') | build/android/devil/utils/parallelizer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698