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

Side by Side Diff: tests/trychange_unittest.py

Issue 5695007: Enhance RunPylint to use white_list and black_list arguments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: address review comment Created 10 years 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/super_mox.py ('k') | tests/watchlists_unittest.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/python 1 #!/usr/bin/python
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2010 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 trychange.py.""" 6 """Unit tests for trychange.py."""
7 7
8 # pylint: disable=E1103,W0403
9
8 # Fixes include path. 10 # Fixes include path.
9 from super_mox import mox, SuperMoxTestBase 11 from super_mox import SuperMoxTestBase
10 12
11 import trychange 13 import trychange
12 14
13 15
14 class TryChangeTestsBase(SuperMoxTestBase): 16 class TryChangeTestsBase(SuperMoxTestBase):
15 """Setups and tear downs the mocks but doesn't test anything as-is.""" 17 """Setups and tear downs the mocks but doesn't test anything as-is."""
16 def setUp(self): 18 def setUp(self):
17 SuperMoxTestBase.setUp(self) 19 SuperMoxTestBase.setUp(self)
18 self.mox.StubOutWithMock(trychange.gclient_utils, 'CheckCall') 20 self.mox.StubOutWithMock(trychange.gclient_utils, 'CheckCall')
19 self.mox.StubOutWithMock(trychange.scm.GIT, 'Capture') 21 self.mox.StubOutWithMock(trychange.scm.GIT, 'Capture')
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 self.mox.ReplayAll() 99 self.mox.ReplayAll()
98 git = trychange.GIT(self.options, self.fake_root) 100 git = trychange.GIT(self.options, self.fake_root)
99 self.assertEqual(git.GetFileNames(), self.expected_files) 101 self.assertEqual(git.GetFileNames(), self.expected_files)
100 self.assertEqual(git.checkout_root, self.fake_root) 102 self.assertEqual(git.checkout_root, self.fake_root)
101 self.assertEqual(git.GenerateDiff(), 'A diff') 103 self.assertEqual(git.GenerateDiff(), 'A diff')
102 104
103 105
104 if __name__ == '__main__': 106 if __name__ == '__main__':
105 import unittest 107 import unittest
106 unittest.main() 108 unittest.main()
OLDNEW
« no previous file with comments | « tests/super_mox.py ('k') | tests/watchlists_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698