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

Unified Diff: tests/git_cl_test.py

Issue 1093943002: Fix mock restoration in git_cl_test (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: address maruel's comment Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/git_cl_test.py
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index 68be49f792cccf455404b6dfe0428cfa4c43e64a..98031ab975b18870e5ca893807d758b8cba2d45f 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -101,9 +101,11 @@ class TestGitCl(TestCase):
git_cl.settings = None
def tearDown(self):
- if not self.has_failed():
- self.assertEquals([], self.calls)
- super(TestGitCl, self).tearDown()
+ try:
+ if not self.has_failed():
+ self.assertEquals([], self.calls)
+ finally:
+ super(TestGitCl, self).tearDown()
def _mocked_call(self, *args, **_kwargs):
self.assertTrue(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698