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

Unified Diff: tests/presubmit_unittest.py

Issue 6413004: Add a presubmit test that asserts TODOs have owners.... (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « presubmit_canned_checks.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/presubmit_unittest.py
===================================================================
--- tests/presubmit_unittest.py (revision 73883)
+++ tests/presubmit_unittest.py (working copy)
@@ -1131,6 +1131,7 @@
'CheckChangeHasNoStrayWhitespace',
'CheckChangeHasOnlyOneEol', 'CheckChangeHasNoCR',
'CheckChangeHasNoCrAndHasOnlyOneEol', 'CheckChangeHasNoTabs',
+ 'CheckChangeTodoHasOwner',
'CheckChangeHasQaField', 'CheckChangeHasTestedField',
'CheckChangeHasTestField',
'CheckChangeLintsClean',
@@ -1309,7 +1310,6 @@
'Foo', 'Foo ',
presubmit.OutputApi.PresubmitPromptWarning)
-
def testCheckChangeHasOnlyOneEol(self):
self.ReadFileTest(presubmit_canned_checks.CheckChangeHasOnlyOneEol,
"Hey!\nHo!\n", "Hey!\nHo!\n\n",
@@ -1331,6 +1331,11 @@
"Hey!\nHo!\n", "Hey!\r\nHo!\r\n",
presubmit.OutputApi.PresubmitPromptWarning)
+ def testCheckChangeTodoHasOwner(self):
+ self.ContentTest(presubmit_canned_checks.CheckChangeTodoHasOwner,
+ "TODO(foo): bar", "TODO: bar",
+ presubmit.OutputApi.PresubmitPromptWarning)
+
def testCannedCheckChangeHasNoTabs(self):
self.ContentTest(presubmit_canned_checks.CheckChangeHasNoTabs,
'blah blah', 'blah\tblah',
« no previous file with comments | « presubmit_canned_checks.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698