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

Side by Side Diff: tests/scm_unittest.py

Issue 6674059: Make sure warnings fail the check when may_prompt=False. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: moved determine_scm() Created 9 years, 9 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 | Annotate | Revision Log
« presubmit_support.py ('K') | « tests/presubmit_unittest.py ('k') | no next file » | 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 scm.py.""" 6 """Unit tests for scm.py."""
7 7
8 # pylint: disable=E1101,W0403 8 # pylint: disable=E1101,W0403
9 9
10 # Fixes include path. 10 # Fixes include path.
(...skipping 21 matching lines...) Expand all
32 self.mox.StubOutWithMock(scm.gclient_utils, 'CheckCallAndFilter') 32 self.mox.StubOutWithMock(scm.gclient_utils, 'CheckCallAndFilter')
33 self.mox.StubOutWithMock(scm.gclient_utils, 'CheckCallAndFilterAndHeader') 33 self.mox.StubOutWithMock(scm.gclient_utils, 'CheckCallAndFilterAndHeader')
34 self.mox.StubOutWithMock(scm.gclient_utils, 'Popen') 34 self.mox.StubOutWithMock(scm.gclient_utils, 'Popen')
35 35
36 36
37 class RootTestCase(BaseSCMTestCase): 37 class RootTestCase(BaseSCMTestCase):
38 def testMembersChanged(self): 38 def testMembersChanged(self):
39 self.mox.ReplayAll() 39 self.mox.ReplayAll()
40 members = [ 40 members = [
41 'GetCasedPath', 'GenFakeDiff', 'GIT', 'SVN', 'ValidateEmail', 41 'GetCasedPath', 'GenFakeDiff', 'GIT', 'SVN', 'ValidateEmail',
42 'cStringIO', 'gclient_utils', 'glob', 'logging', 'os', 're', 'shutil', 42 'cStringIO', 'determine_scm', 'gclient_utils', 'glob', 'logging', 'os',
43 'subprocess', 'sys', 'tempfile', 'time', 'xml', 43 're', 'shutil', 'subprocess', 'sys', 'tempfile', 'time', 'xml',
44 ] 44 ]
45 # If this test fails, you should add the relevant test. 45 # If this test fails, you should add the relevant test.
46 self.compareMembers(scm, members) 46 self.compareMembers(scm, members)
47 47
48 48
49 class GitWrapperTestCase(BaseSCMTestCase): 49 class GitWrapperTestCase(BaseSCMTestCase):
50 def testMembersChanged(self): 50 def testMembersChanged(self):
51 members = [ 51 members = [
52 'AssertVersion', 'Capture', 'CaptureStatus', 52 'AssertVersion', 'Capture', 'CaptureStatus',
53 'FetchUpstreamTuple', 53 'FetchUpstreamTuple',
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 self.assertTree(self.tree, self.svn_root) 311 self.assertTree(self.tree, self.svn_root)
312 # Asserting the tree is not sufficient, svn status must come out clear too. 312 # Asserting the tree is not sufficient, svn status must come out clear too.
313 self.assertEquals('', self._capture(['status'])) 313 self.assertEquals('', self._capture(['status']))
314 314
315 315
316 if __name__ == '__main__': 316 if __name__ == '__main__':
317 import unittest 317 import unittest
318 unittest.main() 318 unittest.main()
319 319
320 # vim: ts=2:sw=2:tw=80:et: 320 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« presubmit_support.py ('K') | « tests/presubmit_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698