Index: PRESUBMIT_test.py |
diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py |
index 8c4b3ffe7baf1c163683c68eae5b3eaef7442092..43ee1e17ec12b3c294bab06229e508a12939ecdc 100755 |
--- a/PRESUBMIT_test.py |
+++ b/PRESUBMIT_test.py |
@@ -43,6 +43,10 @@ class MockOutputApi(object): |
MockOutputApi.PresubmitResult.__init__(self, message, items, long_text) |
self.type = 'notify' |
+ class PresubmitPromptOrNotify(PresubmitResult): |
+ def __init__(self, message, items, long_text=''): |
+ MockOutputApi.PresubmitResult.__init__(self, message, items, long_text) |
+ self.type = 'promptOrNotify' |
M-A Ruel
2013/03/26 18:05:00
add another line.
Wez
2013/03/26 20:08:02
Done.
|
class MockFile(object): |
def __init__(self, local_path, new_contents): |
@@ -246,19 +250,7 @@ class IncludeOrderTest(unittest.TestCase): |
warnings = PRESUBMIT._CheckIncludeOrder(mock_input_api, mock_output_api) |
self.assertEqual(1, len(warnings)) |
self.assertEqual(2, len(warnings[0].items)) |
- self.assertEqual('warning', warnings[0].type) |
- |
- def testOnlyNotifyOnCommit(self): |
- mock_input_api = MockInputApi() |
- mock_input_api.is_committing = True |
- mock_output_api = MockOutputApi() |
- contents = ['#include <b.h>', |
- '#include <a.h>'] |
- mock_input_api.files = [MockFile('something.cc', contents)] |
- warnings = PRESUBMIT._CheckIncludeOrder(mock_input_api, mock_output_api) |
- self.assertEqual(1, len(warnings)) |
- self.assertEqual(1, len(warnings[0].items)) |
- self.assertEqual('notify', warnings[0].type) |
+ self.assertEqual('promptOrNotify', warnings[0].type) |
def testUncheckableIncludes(self): |
mock_input_api = MockInputApi() |