Fix mock restoration in git_cl_test

The assertion in TestGitCl.tearDown should be done after super.tearDown
is finished. Otherwise if the assertion fails, mocked objects won't be
restored properly, and the next TestCase would be affected.

Review URL: https://codereview.chromium.org/1093943002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295049 0039d316-1c4b-4281-b951-d872f2087c98
changes/01/332501/1
wychen@chromium.org 10 years ago
parent 7676cca756
commit 445c896d9f

@ -100,8 +100,10 @@ class TestGitCl(TestCase):
git_cl.settings = None
def tearDown(self):
try:
if not self.has_failed():
self.assertEquals([], self.calls)
finally:
super(TestGitCl, self).tearDown()
def _mocked_call(self, *args, **_kwargs):

Loading…
Cancel
Save