Chromium Code Reviews| Index: tests/presubmit_unittest.py |
| diff --git a/tests/presubmit_unittest.py b/tests/presubmit_unittest.py |
| index 0de435a9c026852ab8e3d6dd4dd8a950994a39a8..004469d416ed32936f53ff887deed380b6e21679 100755 |
| --- a/tests/presubmit_unittest.py |
| +++ b/tests/presubmit_unittest.py |
| @@ -63,7 +63,8 @@ class PresubmitUnittest(PresubmitTestsBase): |
| def testMembersChanged(self): |
| self.mox.ReplayAll() |
| members = [ |
| - 'AffectedFile', 'Change', 'DoPresubmitChecks', 'InputApi', |
| + 'AffectedFile', 'Change', 'DoPresubmitChecks', 'GitChange', |
| + 'GitAffectedFile', 'InputApi', |
| 'ListRelevantPresubmitFiles', 'Main', 'NotImplementedException', |
| 'OutputApi', 'ParseFiles', 'PresubmitExecuter', 'ScanSubDirs', |
| 'SvnAffectedFile', 'SvnChange', |
| @@ -462,6 +463,24 @@ def CheckChangeOnCommit(input_api, output_api): |
| '** Presubmit Messages **\n' |
| 'http://tracker.com/42\n\n')) |
| + def testMain(self): |
| + self.mox.StubOutWithMock(presubmit, 'DoPresubmitChecks') |
| + self.mox.StubOutWithMock(presubmit, 'ParseFiles') |
| + presubmit.os.path.isdir(presubmit.os.path.join(self.fake_root_dir, '.git') |
| + ).AndReturn(False) |
|
Nicolas Sylvain
2009/06/15 17:04:14
weird alignment. first time i see something like t
|
| + presubmit.os.path.isdir(presubmit.os.path.join(self.fake_root_dir, '.svn') |
| + ).AndReturn(False) |
| + #presubmit.ParseFiles([], None).AndReturn([]) |
|
Nicolas Sylvain
2009/06/15 17:04:14
commented out?
|
| + presubmit.DoPresubmitChecks(mox.IgnoreArg(), False, False, |
| + mox.IgnoreArg(), |
| + mox.IgnoreArg(), |
| + None, False).AndReturn(False) |
| + self.mox.ReplayAll() |
| + |
| + self.assertEquals(True, |
| + presubmit.Main(['presubmit', '--root', |
| + self.fake_root_dir])) |
| + |
| class InputApiUnittest(PresubmitTestsBase): |
| """Tests presubmit.InputApi.""" |