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

Side by Side Diff: tests/breakpad_unittest.py

Issue 8508017: Standardize the sys.path fix up and fix a few pylint warnings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Previous patchset was broken 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 | « pylintrc ('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 # pylint: disable=W0403 8 import os
9 import sys
9 10
10 # Fixes include path. 11 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
12
11 from super_mox import SuperMoxTestBase 13 from super_mox import SuperMoxTestBase
12 14
13 import breakpad 15 import breakpad
14 16
15 17
16 class Breakpad(SuperMoxTestBase): 18 class Breakpad(SuperMoxTestBase):
17 """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."""
18 def setUp(self): 20 def setUp(self):
19 super(Breakpad, self).setUp() 21 super(Breakpad, self).setUp()
20 self.mox.StubOutWithMock(breakpad.atexit, 'register') 22 self.mox.StubOutWithMock(breakpad.atexit, 'register')
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 def testSendException(self): 111 def testSendException(self):
110 obj = Exception('foo') 112 obj = Exception('foo')
111 obj.msg = 'a message' 113 obj.msg = 'a message'
112 self._check(obj, 'foo\nMsg: a message') 114 self._check(obj, 'foo\nMsg: a message')
113 115
114 116
115 117
116 if __name__ == '__main__': 118 if __name__ == '__main__':
117 import unittest 119 import unittest
118 unittest.main() 120 unittest.main()
OLDNEW
« no previous file with comments | « pylintrc ('k') | tests/checkout_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698