summaryrefslogtreecommitdiff
path: root/Tools/Scripts/webkitpy/tool/steps/commit_unittest.py
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
commit2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch)
tree988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Tools/Scripts/webkitpy/tool/steps/commit_unittest.py
parentdd91e772430dc294e3bf478c119ef8d43c0a3358 (diff)
downloadqtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Tools/Scripts/webkitpy/tool/steps/commit_unittest.py')
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/commit_unittest.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tools/Scripts/webkitpy/tool/steps/commit_unittest.py b/Tools/Scripts/webkitpy/tool/steps/commit_unittest.py
index 43f366492..50dfaea2b 100644
--- a/Tools/Scripts/webkitpy/tool/steps/commit_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/steps/commit_unittest.py
@@ -29,6 +29,7 @@
import unittest
from webkitpy.common.system.outputcapture import OutputCapture
+from webkitpy.common.system.executive import ScriptError
from webkitpy.common.system.executive_mock import MockExecutive
from webkitpy.tool.mocktool import MockOptions, MockTool
from webkitpy.tool.steps.commit import Commit
@@ -39,8 +40,10 @@ class CommitTest(unittest.TestCase):
capture = OutputCapture()
options = MockOptions()
options.git_commit = ""
+ options.non_interactive = True
tool = MockTool()
+ tool.user = None # Will cause any access of tool.user to raise an exception.
step = Commit(tool, options)
state = {
"changed_files": ["test_expectations.txtXXX"],
@@ -55,4 +58,4 @@ class CommitTest(unittest.TestCase):
capture.assert_outputs(self, step.run, [state], expected_stderr="MOCK run_and_throw_if_fail: ['mock-check-webkit-style', '--diff-files', 'platform/chromium/test_expectations.txt'], cwd=/mock-checkout\nCommitted r49824: <http://trac.webkit.org/changeset/49824>\n")
tool.executive = MockExecutive(should_log=True, should_throw_when_run=set(["platform/chromium/test_expectations.txt"]))
- self.assertRaises(SystemExit, capture.assert_outputs, self, step.run, [state])
+ self.assertRaises(ScriptError, capture.assert_outputs, self, step.run, [state])