Chromium Code Reviews| Index: tests/presubmit_unittest.py |
| =================================================================== |
| --- tests/presubmit_unittest.py (revision 86301) |
| +++ tests/presubmit_unittest.py (working copy) |
| @@ -661,9 +661,9 @@ |
| self.mox.ReplayAll() |
| executer = presubmit.GetTrySlavesExecuter() |
| - self.assertEqual([], executer.ExecPresubmitScript('', '')) |
| + self.assertEqual([], executer.ExecPresubmitScript('', '', '')) |
| self.assertEqual( |
| - [], executer.ExecPresubmitScript('def foo():\n return\n', '')) |
| + [], executer.ExecPresubmitScript('def foo():\n return\n', '', '')) |
|
M-A Ruel
2011/05/26 12:49:49
You don't want to add a quick test for 'def foo(pr
bradn
2011/05/26 16:52:06
Done.
|
| # bad results |
| starts_with_space_result = [' starts_with_space'] |
| @@ -672,7 +672,7 @@ |
| for result in starts_with_space_result, not_list_result1, not_list_result2: |
| self.assertRaises(presubmit.PresubmitFailure, |
| executer.ExecPresubmitScript, |
| - self.presubmit_tryslave % result, '') |
| + self.presubmit_tryslave % result, '', '') |
| # good results |
| expected_result = ['1', '2', '3'] |
| @@ -681,7 +681,8 @@ |
| for result in expected_result, empty_result, space_in_name_result: |
| self.assertEqual( |
| result, |
| - executer.ExecPresubmitScript(self.presubmit_tryslave % result, '')) |
| + executer.ExecPresubmitScript( |
| + self.presubmit_tryslave % result, '', '')) |
| def testDoGetTrySlaves(self): |
| join = presubmit.os.path.join |
| @@ -709,12 +710,12 @@ |
| output = StringIO.StringIO() |
| self.assertEqual(['win'], |
| presubmit.DoGetTrySlaves([filename], self.fake_root_dir, |
| - None, False, output)) |
| + None, None, False, output)) |
| output = StringIO.StringIO() |
| self.assertEqual(['win', 'linux'], |
| presubmit.DoGetTrySlaves([filename, filename_linux], |
| - self.fake_root_dir, None, False, |
| - output)) |
| + self.fake_root_dir, None, None, |
| + False, output)) |
|
M-A Ruel
2011/05/26 12:49:49
Please use space instead.
bradn
2011/05/26 16:52:06
Done.
|
| def testMainUnversioned(self): |
| # OptParser calls presubmit.os.path.exists and is a pain when mocked. |