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

Unified Diff: tests/presubmit_unittest.py

Issue 115516: Add new presubmit check RunPythonUnitTests. (Closed)
Patch Set: Created 11 years, 7 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
diff --git a/tests/presubmit_unittest.py b/tests/presubmit_unittest.py
index 2eb1ec428c5d215b689a38931564fbbea930be88..c449c710f14b6910dc2e6c92ad4aa5ac41810c96 100755
--- a/tests/presubmit_unittest.py
+++ b/tests/presubmit_unittest.py
@@ -592,7 +592,7 @@ class CannedChecksUnittest(PresubmitTestsBase):
'CheckChangeHasQaField', 'CheckChangeHasTestedField',
'CheckChangeHasTestField', 'CheckDoNotSubmit',
'CheckDoNotSubmitInDescription', 'CheckDoNotSubmitInFiles',
- 'CheckLongLines', 'CheckTreeIsOpen',
+ 'CheckLongLines', 'CheckTreeIsOpen', 'RunPythonUnitTests',
]
# If this test fails, you should add the relevant test.
self.compareMembers(presubmit_canned_checks, members)
@@ -693,6 +693,14 @@ class CannedChecksUnittest(PresubmitTestsBase):
self.MockInputApi(), presubmit.OutputApi, url='url_to_closed', closed='0'
))
+ def RunPythonUnitTests(self):
+ # TODO(maruel): Add real tests.
+ self.failIf(presubmit_canned_checks.RunPythonUnitTests(
+ self.MockInputApi(),
+ presubmit.OutputApi, []))
+ self.failUnless(presubmit_canned_checks.RunPythonUnitTests(
+ self.MockInputApi(),
+ presubmit.OutputApi, ['non_existent_module']))
if __name__ == '__main__':
unittest.main()
« 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