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

Side by Side Diff: tests/breakpad_unittest.py

Issue 8508015: Create a new depot_tools_testing_lib to move utility modules there (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Renamed to testing_support Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « tests/__init__.py ('k') | tests/checkout_test.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 (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 """Unit tests for breakpad.py.""" 6 """Unit tests for breakpad.py."""
7 7
8 import os 8 import os
9 import sys 9 import sys
10 10
11 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 11 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
12 12
13 from super_mox import SuperMoxTestBase 13 from testing_support.super_mox import SuperMoxTestBase
14 14
15 import breakpad 15 import breakpad
16 16
17 17
18 class Breakpad(SuperMoxTestBase): 18 class Breakpad(SuperMoxTestBase):
19 """Setups and tear downs the mocks but doesn't test anything as-is.""" 19 """Setups and tear downs the mocks but doesn't test anything as-is."""
20 def setUp(self): 20 def setUp(self):
21 super(Breakpad, self).setUp() 21 super(Breakpad, self).setUp()
22 self.mox.StubOutWithMock(breakpad.atexit, 'register') 22 self.mox.StubOutWithMock(breakpad.atexit, 'register')
23 self.mox.StubOutWithMock(breakpad.getpass, 'getuser') 23 self.mox.StubOutWithMock(breakpad.getpass, 'getuser')
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 def testSendException(self): 111 def testSendException(self):
112 obj = Exception('foo') 112 obj = Exception('foo')
113 obj.msg = 'a message' 113 obj.msg = 'a message'
114 self._check(obj, 'foo\nMsg: a message') 114 self._check(obj, 'foo\nMsg: a message')
115 115
116 116
117 117
118 if __name__ == '__main__': 118 if __name__ == '__main__':
119 import unittest 119 import unittest
120 unittest.main() 120 unittest.main()
OLDNEW
« no previous file with comments | « tests/__init__.py ('k') | tests/checkout_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698